Changeset 98028 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 9, 2023 9:46:16 AM (2 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/AudioAdapterImpl.h
r96407 r98028 85 85 HRESULT setProperty(const com::Utf8Str &aKey, const com::Utf8Str &aValue); 86 86 87 AudioSettings * const mParent; 88 const ComObjPtr<AudioAdapter> mPeer; 89 Backupable<settings::AudioAdapter> mData; 87 private: 88 89 struct Data; 90 Data *m; 90 91 }; 91 92 -
trunk/src/VBox/Main/include/AudioSettingsImpl.h
r96407 r98028 64 64 65 65 // public methods only for internal purposes 66 Machine* i_getParent(void);67 66 bool i_canChangeSettings(void); 68 67 void i_onAdapterChanged(IAudioAdapter *pAdapter); -
trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp
r98011 r98028 41 41 42 42 43 //////////////////////////////////////////////////////////////////////////////// 44 // 45 // AudioAdapter private data definition 46 // 47 //////////////////////////////////////////////////////////////////////////////// 48 49 struct AudioAdapter::Data 50 { 51 Data() 52 : pParent(NULL) 53 { } 54 55 AudioSettings * const pParent; 56 const ComObjPtr<AudioAdapter> pPeer; 57 58 // use the XML settings structure in the members for simplicity 59 Backupable<settings::AudioAdapter> bd; 60 }; 61 43 62 // constructor / destructor 44 63 ///////////////////////////////////////////////////////////////////////////// 45 64 46 65 AudioAdapter::AudioAdapter() 47 : mParent(NULL)48 66 { 49 67 } … … 68 86 69 87 /** 70 * Initializes the audio adapter object. 71 * 72 * @param aParent Handle of the parent object. 88 * Initializes the audio adapter object. 89 * 90 * @returns HRESULT 91 * @param aParent Pointer of the parent object. 73 92 */ 74 93 HRESULT AudioAdapter::init(AudioSettings *aParent) 75 94 { 76 LogFlowThisFunc(("aParent=%p\n", aParent));77 78 95 ComAssertRet(aParent, E_INVALIDARG); 79 96 … … 82 99 AssertReturn(autoInitSpan.isOk(), E_FAIL); 83 100 84 unconst(mParent) = aParent; 101 m = new Data(); 102 103 unconst(m->pParent) = aParent; 85 104 /* mPeer is left null */ 86 87 mData.allocate();88 105 89 106 /* We now always default to the "Default" audio driver, to make it easier … … 91 108 * 92 109 * This can be changed by the user explicitly, if needed / wanted. */ 93 mData->driverType = AudioDriverType_Default; 94 mData->fEnabledIn = false; 95 mData->fEnabledOut = false; 110 m->bd.allocate(); 111 m->bd->driverType = AudioDriverType_Default; 112 m->bd->fEnabledIn = false; 113 m->bd->fEnabledOut = false; 96 114 97 115 /* Confirm a successful initialization */ … … 102 120 103 121 /** 104 * Initializes the audio adapter object given another audio adapter object 105 * (a kind of copy constructor). This object shares data with 106 * the object passed as an argument. 107 * 108 * @note This object must be destroyed before the original object 109 * it shares data with is destroyed. 110 * 111 * @note Locks @a aThat object for reading. 122 * Initializes the audio adapter object given another audio adapter object 123 * (a kind of copy constructor). This object shares data with 124 * the object passed as an argument. 125 * 126 * @note This object must be destroyed before the original object 127 * it shares data with is destroyed. 128 * 129 * @note Locks @a aThat object for reading. 130 * 131 * @returns HRESULT 132 * @param aParent Pointer of the parent object. 133 * @param aThat Pointer to audio adapter to use settings from. 112 134 */ 113 135 HRESULT AudioAdapter::init(AudioSettings *aParent, AudioAdapter *aThat) 114 136 { 115 LogFlowThisFunc(("aParent=%p, aThat=%p\n", aParent, aThat));116 117 137 ComAssertRet(aParent && aThat, E_INVALIDARG); 118 138 … … 121 141 AssertReturn(autoInitSpan.isOk(), E_FAIL); 122 142 123 unconst(mParent) = aParent; 124 unconst(mPeer) = aThat; 143 m = new Data(); 144 145 unconst(m->pParent) = aParent; 146 unconst(m->pPeer) = aThat; 125 147 126 148 AutoCaller thatCaller(aThat); … … 128 150 129 151 AutoReadLock thatLock(aThat COMMA_LOCKVAL_SRC_POS); 130 m Data.share(aThat->mData);152 m->bd.share(aThat->m->bd); 131 153 132 154 /* Confirm a successful initialization */ … … 137 159 138 160 /** 139 * Initializes the audio adapter object given another audio adapter object 140 * (a kind of copy constructor). This object makes a private copy of data 141 * of the original object passed as an argument. 142 * 143 * @note Locks @a aThat object for reading. 161 * Initializes the audio adapter object given another audio adapter object 162 * (a kind of copy constructor). This object makes a private copy of data 163 * of the original object passed as an argument. 164 * 165 * @note Locks @a aThat object for reading. 166 * 167 * @returns HRESULT 168 * @param aParent Pointer of the parent object. 169 * @param aThat Pointer to audio adapter to use settings from. 144 170 */ 145 171 HRESULT AudioAdapter::initCopy(AudioSettings *aParent, AudioAdapter *aThat) 146 172 { 147 LogFlowThisFunc(("aParent=%p, aThat=%p\n", aParent, aThat));148 149 173 ComAssertRet(aParent && aThat, E_INVALIDARG); 150 174 … … 153 177 AssertReturn(autoInitSpan.isOk(), E_FAIL); 154 178 155 unconst(mParent) = aParent; 179 m = new Data(); 180 181 unconst(m->pParent) = aParent; 156 182 /* mPeer is left null */ 157 183 … … 160 186 161 187 AutoReadLock thatLock(aThat COMMA_LOCKVAL_SRC_POS); 162 m Data.attachCopy(aThat->mData);188 m->bd.attachCopy(aThat->m->bd); 163 189 164 190 /* Confirm a successful initialization */ … … 174 200 void AudioAdapter::uninit(void) 175 201 { 176 LogFlowThisFunc(("\n"));177 178 202 /* Enclose the state transition Ready->InUninit->NotReady */ 179 203 AutoUninitSpan autoUninitSpan(this); … … 181 205 return; 182 206 183 unconst(mPeer) = NULL; 184 unconst(mParent) = NULL; 185 186 mData.free(); 207 unconst(m->pPeer) = NULL; 208 unconst(m->pParent) = NULL; 209 210 delete m; 211 m = NULL; 187 212 } 188 213 … … 197 222 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 198 223 199 *aEnabled = m Data->fEnabled;224 *aEnabled = m->bd->fEnabled; 200 225 201 226 return S_OK; … … 209 234 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 210 235 211 if (m Data->fEnabled != RT_BOOL(aEnabled))212 { 213 m Data.backup();214 m Data->fEnabled = RT_BOOL(aEnabled);236 if (m->bd->fEnabled != RT_BOOL(aEnabled)) 237 { 238 m->bd.backup(); 239 m->bd->fEnabled = RT_BOOL(aEnabled); 215 240 alock.release(); 216 241 217 m Parent->i_onSettingsChanged(); // mParent is const, needs no locking218 m Parent->i_onAdapterChanged(this);242 m->pParent->i_onSettingsChanged(); // mParent is const, needs no locking 243 m->pParent->i_onAdapterChanged(this); 219 244 } 220 245 … … 229 254 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 230 255 231 *aEnabled = mData->fEnabledIn;256 *aEnabled = RT_BOOL(m->bd->fEnabledIn); 232 257 233 258 return S_OK; … … 241 266 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 242 267 243 if (RT_BOOL(aEnabled) != m Data->fEnabledIn)244 { 245 m Data.backup();246 m Data->fEnabledIn = RT_BOOL(aEnabled);268 if (RT_BOOL(aEnabled) != m->bd->fEnabledIn) 269 { 270 m->bd.backup(); 271 m->bd->fEnabledIn = RT_BOOL(aEnabled); 247 272 248 273 alock.release(); 249 274 250 m Parent->i_onSettingsChanged(); // mParent is const, needs no locking251 m Parent->i_onAdapterChanged(this);275 m->pParent->i_onSettingsChanged(); // mParent is const, needs no locking 276 m->pParent->i_onAdapterChanged(this); 252 277 } 253 278 … … 262 287 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 263 288 264 *aEnabled = mData->fEnabledOut;289 *aEnabled = RT_BOOL(m->bd->fEnabledOut); 265 290 266 291 return S_OK; … … 274 299 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 275 300 276 if (RT_BOOL(aEnabled) != m Data->fEnabledOut)277 { 278 m Data.backup();279 m Data->fEnabledOut = RT_BOOL(aEnabled);301 if (RT_BOOL(aEnabled) != m->bd->fEnabledOut) 302 { 303 m->bd.backup(); 304 m->bd->fEnabledOut = RT_BOOL(aEnabled); 280 305 281 306 alock.release(); 282 307 283 m Parent->i_onSettingsChanged(); // mParent is const, needs no locking284 m Parent->i_onAdapterChanged(this);308 m->pParent->i_onSettingsChanged(); // mParent is const, needs no locking 309 m->pParent->i_onAdapterChanged(this); 285 310 } 286 311 … … 295 320 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 296 321 297 *aAudioDriver = m Data->driverType;322 *aAudioDriver = m->bd->driverType; 298 323 299 324 return S_OK; … … 309 334 HRESULT rc = S_OK; 310 335 311 if (m Data->driverType != aAudioDriver)336 if (m->bd->driverType != aAudioDriver) 312 337 { 313 338 if (settings::MachineConfigFile::isAudioDriverAllowedOnThisHost(aAudioDriver)) 314 339 { 315 m Data.backup();316 m Data->driverType = aAudioDriver;340 m->bd.backup(); 341 m->bd->driverType = aAudioDriver; 317 342 318 343 alock.release(); 319 344 320 m Parent->i_onSettingsChanged(); // mParent is const, needs no locking345 m->pParent->i_onSettingsChanged(); // mParent is const, needs no locking 321 346 } 322 347 else … … 337 362 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 338 363 339 *aAudioController = m Data->controllerType;364 *aAudioController = m->bd->controllerType; 340 365 341 366 return S_OK; … … 351 376 HRESULT hrc = S_OK; 352 377 353 if (m Data->controllerType != aAudioController)378 if (m->bd->controllerType != aAudioController) 354 379 { 355 380 AudioCodecType_T defaultCodec; … … 379 404 if (SUCCEEDED(hrc)) 380 405 { 381 m Data.backup();382 m Data->controllerType = aAudioController;383 m Data->codecType = defaultCodec;406 m->bd.backup(); 407 m->bd->controllerType = aAudioController; 408 m->bd->codecType = defaultCodec; 384 409 385 410 alock.release(); 386 411 387 m Parent->i_onSettingsChanged(); // mParent is const, needs no locking412 m->pParent->i_onSettingsChanged(); // mParent is const, needs no locking 388 413 } 389 414 } … … 399 424 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 400 425 401 *aAudioCodec = m Data->codecType;426 *aAudioCodec = m->bd->codecType; 402 427 403 428 return S_OK; … … 416 441 * ensure that the codec type matches the audio controller 417 442 */ 418 switch (m Data->controllerType)443 switch (m->bd->controllerType) 419 444 { 420 445 case AudioControllerType_AC97: … … 442 467 default: 443 468 AssertMsgFailed(("Wrong audio controller type %d\n", 444 m Data->controllerType));469 m->bd->controllerType)); 445 470 hrc = E_FAIL; 446 471 } … … 451 476 aAudioCodec); 452 477 453 if (m Data->codecType != aAudioCodec)454 { 455 m Data.backup();456 m Data->codecType = aAudioCodec;478 if (m->bd->codecType != aAudioCodec) 479 { 480 m->bd.backup(); 481 m->bd->codecType = aAudioCodec; 457 482 458 483 alock.release(); 459 484 460 m Parent->i_onSettingsChanged(); // mParent is const, needs no locking485 m->pParent->i_onSettingsChanged(); // mParent is const, needs no locking 461 486 } 462 487 … … 474 499 475 500 aProperties.resize(0); 476 StringsMap::const_iterator cit = m Data->properties.begin();477 while(cit != m Data->properties.end())501 StringsMap::const_iterator cit = m->bd->properties.begin(); 502 while(cit != m->bd->properties.end()) 478 503 { 479 504 Utf8Str key = cit->first; … … 492 517 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 493 518 494 settings::StringsMap::const_iterator cit = m Data->properties.find(aKey);495 if (cit != m Data->properties.end())519 settings::StringsMap::const_iterator cit = m->bd->properties.find(aKey); 520 if (cit != m->bd->properties.end()) 496 521 aValue = cit->second; 497 522 … … 511 536 Utf8Str strOldValue; 512 537 513 settings::StringsMap::const_iterator cit = m Data->properties.find(aKey);514 if (cit != m Data->properties.end())538 settings::StringsMap::const_iterator cit = m->bd->properties.find(aKey); 539 if (cit != m->bd->properties.end()) 515 540 strOldValue = cit->second; 516 541 … … 518 543 { 519 544 if (aValue.isEmpty()) 520 m Data->properties.erase(aKey);545 m->bd->properties.erase(aKey); 521 546 else 522 m Data->properties[aKey] = aValue;547 m->bd->properties[aKey] = aValue; 523 548 } 524 549 … … 535 560 536 561 /** 537 * Loads settings from the given machine node. 538 * May be called once right after this object creation. 539 * 540 * @param data Configuration settings. 541 * 542 * @note Locks this object for writing. 562 * Loads settings from the given machine node. 563 * May be called once right after this object creation. 564 * 565 * @returns HRESULT 566 * @param data Audio adapter configuration settings to load from. 567 * 568 * @note Locks this object for writing. 543 569 */ 544 570 HRESULT AudioAdapter::i_loadSettings(const settings::AudioAdapter &data) … … 559 585 * the same setting of an object loaded from the old settings file must 560 586 * default to B. */ 561 mData.assignCopy(&data); 562 563 return S_OK; 564 } 565 566 /** 567 * Saves settings to the given machine node. 568 * 569 * @param data Configuration settings. 570 * 571 * @note Locks this object for reading. 587 m->bd.assignCopy(&data); 588 589 return S_OK; 590 } 591 592 /** 593 * Saves settings to the given machine node. 594 * 595 * @returns HRESULT 596 * @param data Audio adapter configuration settings to save to. 597 * 598 * @note Locks this object for reading. 572 599 */ 573 600 HRESULT AudioAdapter::i_saveSettings(settings::AudioAdapter &data) … … 578 605 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 579 606 580 data = *mData.data(); 581 582 return S_OK; 583 } 584 585 /** 586 * @note Locks this object for writing. 607 data = *m->bd.data(); 608 609 return S_OK; 610 } 611 612 /** 613 * Rolls back the current configuration to a former state. 614 * 615 * @note Locks this object for writing. 587 616 */ 588 617 void AudioAdapter::i_rollback() … … 594 623 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 595 624 596 mData.rollback(); 597 } 598 599 /** 600 * @note Locks this object for writing, together with the peer object (also 601 * for writing) if there is one. 625 m->bd.rollback(); 626 } 627 628 /** 629 * Commits the current settings and propagates those to a peer (if assigned). 630 * 631 * @note Locks this object for writing, together with the peer object (also 632 * for writing) if there is one. 602 633 */ 603 634 void AudioAdapter::i_commit() … … 608 639 609 640 /* sanity too */ 610 AutoCaller peerCaller(m Peer);641 AutoCaller peerCaller(m->pPeer); 611 642 AssertComRCReturnVoid(peerCaller.rc()); 612 643 613 644 /* lock both for writing since we modify both (mPeer is "master" so locked 614 645 * first) */ 615 AutoMultiWriteLock2 alock(m Peer, this COMMA_LOCKVAL_SRC_POS);616 617 if (m Data.isBackedUp())618 { 619 m Data.commit();620 if (m Peer)646 AutoMultiWriteLock2 alock(m->pPeer, this COMMA_LOCKVAL_SRC_POS); 647 648 if (m->bd.isBackedUp()) 649 { 650 m->bd.commit(); 651 if (m->pPeer) 621 652 { 622 653 /* attach new data to the peer and reshare it */ 623 mPeer->mData.attach(mData); 624 } 625 } 626 } 627 628 /** 629 * @note Locks this object for writing, together with the peer object 630 * represented by @a aThat (locked for reading). 654 m->pPeer->m->bd.attach(m->bd); 655 } 656 } 657 } 658 659 /** 660 * Copies settings from a given audio adapter object. 661 * 662 * This object makes a private copy of data of the original object passed as 663 * an argument. 664 * 665 * @note Locks this object for writing, together with the peer object 666 * represented by @a aThat (locked for reading). 667 * 668 * @param aThat Audio adapter to load settings from. 631 669 */ 632 670 void AudioAdapter::i_copyFrom(AudioAdapter *aThat) … … 648 686 649 687 /* this will back up current data */ 650 m Data.assignCopy(aThat->mData);688 m->bd.assignCopy(aThat->m->bd); 651 689 } 652 690 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/src-server/AudioSettingsImpl.cpp
r96407 r98028 48 48 { 49 49 Data() 50 : p Parent(NULL)50 : pMachine(NULL) 51 51 { } 52 52 53 Machine * const p Parent;53 Machine * const pMachine; 54 54 const ComObjPtr<AudioAdapter> pAdapter; 55 55 const ComObjPtr<AudioSettings> pPeer; … … 76 76 * Initializes the audio settings object. 77 77 * 78 * @param aParent Handle of the parent object. 78 * @returns HRESULT 79 * @param aParent Pointer of the parent object. 79 80 */ 80 81 HRESULT AudioSettings::init(Machine *aParent) 81 82 { 82 LogFlowThisFunc(("aParent=%p\n", aParent));83 84 83 ComAssertRet(aParent, E_INVALIDARG); 85 84 … … 91 90 92 91 /* share the parent weakly */ 93 unconst(m->p Parent) = aParent;92 unconst(m->pMachine) = aParent; 94 93 95 94 /* create the audio adapter object (always present, default is disabled) */ … … 109 108 * 110 109 * @note This object must be destroyed before the original object 111 * it shares data with is destroyed.110 * it shares data with is destroyed. 112 111 * 113 112 * @note Locks @a aThat object for reading. 113 * 114 * @returns HRESULT 115 * @param aParent Pointer of the parent object. 116 * @param aThat Pointer to audio adapter to use settings from. 114 117 */ 115 118 HRESULT AudioSettings::init(Machine *aParent, AudioSettings *aThat) 116 119 { 117 LogFlowThisFuncEnter();118 LogFlowThisFunc(("aParent: %p, aThat: %p\n", aParent, aThat));119 120 120 ComAssertRet(aParent && aThat, E_INVALIDARG); 121 121 … … 126 126 m = new Data(); 127 127 128 unconst(m->p Parent) = aParent;129 unconst(m->pPeer) = aThat;128 unconst(m->pMachine) = aParent; 129 unconst(m->pPeer) = aThat; 130 130 131 131 AutoCaller thatCaller(aThat); … … 134 134 AutoReadLock thatlock(aThat COMMA_LOCKVAL_SRC_POS); 135 135 136 unconst(m->pAdapter) = aThat->m->pAdapter; 136 HRESULT hrc = unconst(m->pAdapter).createObject(); 137 ComAssertComRCRet(hrc, hrc); 138 hrc = m->pAdapter->init(this, aThat->m->pAdapter); 139 ComAssertComRCRet(hrc, hrc); 137 140 138 141 autoInitSpan.setSucceeded(); 139 142 140 LogFlowThisFuncLeave();141 143 return S_OK; 142 144 } … … 148 150 * 149 151 * @note Locks @a aThat object for reading. 152 * 153 * @returns HRESULT 154 * @param aParent Pointer of the parent object. 155 * @param aThat Pointer to audio adapter to use settings from. 150 156 */ 151 157 HRESULT AudioSettings::initCopy(Machine *aParent, AudioSettings *aThat) 152 158 { 153 LogFlowThisFuncEnter();154 LogFlowThisFunc(("aParent: %p, aThat: %p\n", aParent, aThat));155 156 159 ComAssertRet(aParent && aThat, E_INVALIDARG); 157 160 … … 162 165 m = new Data(); 163 166 164 unconst(m->p Parent) = aParent;167 unconst(m->pMachine) = aParent; 165 168 // pPeer is left null 166 169 … … 175 178 autoInitSpan.setSucceeded(); 176 179 177 LogFlowThisFuncLeave();178 180 return S_OK; 179 181 } … … 185 187 void AudioSettings::uninit(void) 186 188 { 187 LogFlowThisFunc(("\n"));188 189 189 /* Enclose the state transition Ready->InUninit->NotReady */ 190 190 AutoUninitSpan autoUninitSpan(this); … … 192 192 return; 193 193 194 unconst(m->pPeer) = NULL; 195 unconst(m->pMachine) = NULL; 196 194 197 delete m; 195 198 m = NULL; … … 230 233 231 234 /** 232 * Returns the parent object as a weak pointer.233 */234 Machine* AudioSettings::i_getParent(void)235 {236 AutoCaller autoCaller(this);237 AssertComRCReturn(autoCaller.rc(), NULL);238 239 AssertPtrReturn(m, NULL);240 return m->pParent;241 }242 243 /**244 235 * Determines whether the audio settings currently can be changed or not. 245 236 * … … 248 239 bool AudioSettings::i_canChangeSettings(void) 249 240 { 250 AutoAnyStateDependency adep(m->p Parent);241 AutoAnyStateDependency adep(m->pMachine); 251 242 if (FAILED(adep.rc())) 252 243 return false; … … 259 250 * Gets called when the machine object needs to know that audio adapter settings 260 251 * have been changed. 252 * 253 * @param pAdapter Pointer to audio adapter which has changed. 261 254 */ 262 255 void AudioSettings::i_onAdapterChanged(IAudioAdapter *pAdapter) 263 256 { 264 LogFlowThisFuncEnter();265 266 257 AssertPtrReturnVoid(pAdapter); 267 268 m->pParent->i_onAudioAdapterChange(pAdapter); // mParent is const, needs no locking 269 270 LogFlowThisFuncLeave(); 258 m->pMachine->i_onAudioAdapterChange(pAdapter); // mParent is const, needs no locking 271 259 } 272 260 … … 274 262 * Gets called when the machine object needs to know that a host audio device 275 263 * has been changed. 264 * 265 * @param pDevice Host audio device which has changed. 266 * @param fIsNew Set to \c true if this is a new device (i.e. has not been present before), \c false if not. 267 * @param enmState The current state of the device. 268 * @param pErrInfo Additional error information in case of error(s). 276 269 */ 277 270 void AudioSettings::i_onHostDeviceChanged(IHostAudioDevice *pDevice, 278 271 bool fIsNew, AudioDeviceState_T enmState, IVirtualBoxErrorInfo *pErrInfo) 279 272 { 280 LogFlowThisFuncEnter();281 282 273 AssertPtrReturnVoid(pDevice); 283 284 m->pParent->i_onHostAudioDeviceChange(pDevice, fIsNew, enmState, pErrInfo); // mParent is const, needs no locking 285 286 LogFlowThisFuncLeave(); 274 m->pMachine->i_onHostAudioDeviceChange(pDevice, fIsNew, enmState, pErrInfo); // mParent is const, needs no locking 287 275 } 288 276 … … 293 281 void AudioSettings::i_onSettingsChanged(void) 294 282 { 295 LogFlowThisFuncEnter(); 296 297 AutoWriteLock mlock(m->pParent COMMA_LOCKVAL_SRC_POS); 298 m->pParent->i_setModified(Machine::IsModified_AudioSettings); 283 AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS); 284 m->pMachine->i_setModified(Machine::IsModified_AudioSettings); 299 285 mlock.release(); 300 301 LogFlowThisFuncLeave();302 286 } 303 287 … … 306 290 * May be called once right after this object creation. 307 291 * 308 * @param data Configuration settings. 292 * @returns HRESULT 293 * @param data Audio adapter configuration settings to load from. 309 294 * 310 295 * @note Locks this object for writing. … … 324 309 325 310 /** 326 * Saves settings to the given node. 327 * 328 * @param data Configuration settings. 311 * Saves audio settings to the given machine node. 312 * 313 * @returns HRESULT 314 * @param data Audio configuration settings to save to. 329 315 * 330 316 * @note Locks this object for reading. … … 344 330 345 331 /** 332 * Copies settings from a given audio settings object. 333 * 334 * This object makes a private copy of data of the original object passed as 335 * an argument. 336 * 346 337 * @note Locks this object for writing, together with the peer object 347 * represented by @a aThat (locked for reading). 338 * represented by @a aThat (locked for reading). 339 * 340 * @param aThat Audio settings to load from. 348 341 */ 349 342 void AudioSettings::i_copyFrom(AudioSettings *aThat) … … 406 399 407 400 /** 401 * Rolls back the current configuration to a former state. 402 * 408 403 * @note Locks this object for writing. 409 404 */ … … 422 417 423 418 /** 419 * Commits the current settings and propagates those to a peer (if assigned). 420 * 424 421 * @note Locks this object for writing, together with the peer object (also 425 * for writing) if there is one.422 * for writing) if there is one. 426 423 */ 427 424 void AudioSettings::i_commit(void)
Note:
See TracChangeset
for help on using the changeset viewer.