Changeset 7207 in vbox for trunk/src/VBox/Main/AudioAdapterImpl.cpp
- Timestamp:
- Feb 28, 2008 6:43:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/AudioAdapterImpl.cpp
r6597 r7207 225 225 switch (aAudioDriver) 226 226 { 227 case AudioDriverType_Null AudioDriver:227 case AudioDriverType_Null: 228 228 #ifdef RT_OS_WINDOWS 229 229 # ifdef VBOX_WITH_WINMM 230 case AudioDriverType_WINMM AudioDriver:231 # endif 232 case AudioDriverType_DSOUND AudioDriver:230 case AudioDriverType_WINMM: 231 # endif 232 case AudioDriverType_DSOUND: 233 233 #endif /* RT_OS_WINDOWS */ 234 234 #ifdef RT_OS_LINUX 235 case AudioDriverType_OSS AudioDriver:235 case AudioDriverType_OSS: 236 236 # ifdef VBOX_WITH_ALSA 237 case AudioDriverType_ALSA AudioDriver:237 case AudioDriverType_ALSA: 238 238 # endif 239 239 # ifdef VBOX_WITH_PULSE 240 case AudioDriverType_Pulse AudioDriver:240 case AudioDriverType_Pulse: 241 241 # endif 242 242 #endif /* RT_OS_LINUX */ 243 243 #ifdef RT_OS_DARWIN 244 case AudioDriverType_Core AudioDriver:245 #endif 244 case AudioDriverType_Core: 245 #endif 246 246 #ifdef RT_OS_OS2 247 case AudioDriverType_MMPM AudioDriver:248 #endif 247 case AudioDriverType_MMPM: 248 #endif 249 249 { 250 250 mData.backup(); … … 324 324 ///////////////////////////////////////////////////////////////////////////// 325 325 326 /** 326 /** 327 327 * Loads settings from the given machine node. 328 328 * May be called once right after this object creation. 329 * 329 * 330 330 * @param aMachineNode <Machine> node. 331 * 332 * @note Locks this object for writing. 331 * 332 * @note Locks this object for writing. 333 333 */ 334 334 HRESULT AudioAdapter::loadSettings (const settings::Key &aMachineNode) … … 352 352 * place when a setting of a newly created object must default to A while 353 353 * the same setting of an object loaded from the old settings file must 354 * default to B. */ 354 * default to B. */ 355 355 356 356 /* AudioAdapter node (required) */ … … 369 369 /* now check the audio driver (required) */ 370 370 const char *driver = audioAdapterNode.stringValue ("driver"); 371 mData->mAudioDriver = AudioDriverType_Null AudioDriver;371 mData->mAudioDriver = AudioDriverType_Null; 372 372 if (strcmp (driver, "null") == 0) 373 373 ; /* Null has been set above */ … … 375 375 else if (strcmp (driver, "winmm") == 0) 376 376 #ifdef VBOX_WITH_WINMM 377 mData->mAudioDriver = AudioDriverType_WINMM AudioDriver;377 mData->mAudioDriver = AudioDriverType_WINMM; 378 378 #else 379 379 /* fall back to dsound */ 380 mData->mAudioDriver = AudioDriverType_DSOUND AudioDriver;380 mData->mAudioDriver = AudioDriverType_DSOUND; 381 381 #endif 382 382 else if (strcmp (driver, "dsound") == 0) 383 mData->mAudioDriver = AudioDriverType_DSOUND AudioDriver;383 mData->mAudioDriver = AudioDriverType_DSOUND; 384 384 #endif // RT_OS_WINDOWS 385 385 #ifdef RT_OS_LINUX 386 386 else if (strcmp (driver, "oss") == 0) 387 mData->mAudioDriver = AudioDriverType_OSS AudioDriver;387 mData->mAudioDriver = AudioDriverType_OSS; 388 388 else if (strcmp (driver, "alsa") == 0) 389 389 # ifdef VBOX_WITH_ALSA 390 mData->mAudioDriver = AudioDriverType_ALSA AudioDriver;390 mData->mAudioDriver = AudioDriverType_ALSA; 391 391 # else 392 392 /* fall back to OSS */ 393 mData->mAudioDriver = AudioDriverType_OSS AudioDriver;393 mData->mAudioDriver = AudioDriverType_OSS; 394 394 # endif 395 395 else if (strcmp (driver, "pulse") == 0) 396 396 # ifdef VBOX_WITH_PULSE 397 mData->mAudioDriver = AudioDriverType_Pulse AudioDriver;397 mData->mAudioDriver = AudioDriverType_Pulse; 398 398 # else 399 399 /* fall back to OSS */ 400 mData->mAudioDriver = AudioDriverType_OSS AudioDriver;400 mData->mAudioDriver = AudioDriverType_OSS; 401 401 # endif 402 402 #endif // RT_OS_LINUX 403 403 #ifdef RT_OS_DARWIN 404 404 else if (strcmp (driver, "coreaudio") == 0) 405 mData->mAudioDriver = AudioDriverType_Core AudioDriver;405 mData->mAudioDriver = AudioDriverType_Core; 406 406 #endif 407 407 #ifdef RT_OS_OS2 408 408 else if (strcmp (driver, "mmpm") == 0) 409 mData->mAudioDriver = AudioDriverType_MMPM AudioDriver;409 mData->mAudioDriver = AudioDriverType_MMPM; 410 410 #endif 411 411 else … … 415 415 } 416 416 417 /** 417 /** 418 418 * Saves settings to the given machine node. 419 * 419 * 420 420 * @param aMachineNode <Machine> node. 421 * 422 * @note Locks this object for reading. 421 * 422 * @note Locks this object for reading. 423 423 */ 424 424 HRESULT AudioAdapter::saveSettings (settings::Key &aMachineNode) … … 454 454 switch (mData->mAudioDriver) 455 455 { 456 case AudioDriverType_Null AudioDriver:456 case AudioDriverType_Null: 457 457 { 458 458 driverStr = "null"; … … 460 460 } 461 461 #ifdef RT_OS_WINDOWS 462 case AudioDriverType_WINMM AudioDriver:462 case AudioDriverType_WINMM: 463 463 # ifdef VBOX_WITH_WINMM 464 464 { … … 467 467 } 468 468 # endif 469 case AudioDriverType_DSOUND AudioDriver:469 case AudioDriverType_DSOUND: 470 470 { 471 471 driverStr = "dsound"; … … 474 474 #endif /* RT_OS_WINDOWS */ 475 475 #ifdef RT_OS_LINUX 476 case AudioDriverType_ALSA AudioDriver:476 case AudioDriverType_ALSA: 477 477 # ifdef VBOX_WITH_ALSA 478 478 { … … 481 481 } 482 482 # endif 483 case AudioDriverType_Pulse AudioDriver:483 case AudioDriverType_Pulse: 484 484 # ifdef VBOX_WITH_PULSE 485 485 { … … 488 488 } 489 489 # endif 490 case AudioDriverType_OSS AudioDriver:490 case AudioDriverType_OSS: 491 491 { 492 492 driverStr = "oss"; … … 495 495 #endif /* RT_OS_LINUX */ 496 496 #ifdef RT_OS_DARWIN 497 case AudioDriverType_Core AudioDriver:497 case AudioDriverType_Core: 498 498 { 499 499 driverStr = "coreaudio"; … … 502 502 #endif 503 503 #ifdef RT_OS_OS2 504 case AudioDriverType_MMPM AudioDriver:504 case AudioDriverType_MMPM: 505 505 { 506 506 driverStr = "mmpm"; … … 520 520 } 521 521 522 /** 522 /** 523 523 * @note Locks this object for writing. 524 524 */ … … 544 544 } 545 545 546 /** 546 /** 547 547 * @note Locks this object for writing, together with the peer object (also 548 548 * for writing) if there is one. … … 572 572 } 573 573 574 /** 574 /** 575 575 * @note Locks this object for writing, together with the peer object 576 576 * represented by @a aThat (locked for reading).
Note:
See TracChangeset
for help on using the changeset viewer.