Changeset 17013 in vbox for trunk/src/VBox/Main/AudioAdapterImpl.cpp
- Timestamp:
- Feb 23, 2009 12:37:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/AudioAdapterImpl.cpp
r16588 r17013 25 25 26 26 #include <iprt/cpputils.h> 27 #include <iprt/ldr.h> 28 #include <iprt/process.h> 27 29 28 30 #include <VBox/settings.h> … … 329 331 // public methods only for internal purposes 330 332 ///////////////////////////////////////////////////////////////////////////// 333 334 AudioAdapter::Data::Data() 335 { 336 /* Generic defaults */ 337 mEnabled = false; 338 mAudioController = AudioControllerType_AC97; 339 /* Driver defaults which are OS specific */ 340 #if defined (RT_OS_WINDOWS) 341 # ifdef VBOX_WITH_WINMM 342 mAudioDriver = AudioDriverType_WinMM; 343 # else /* VBOX_WITH_WINMM */ 344 mAudioDriver = AudioDriverType_DirectSound; 345 # endif /* !VBOX_WITH_WINMM */ 346 #elif defined (RT_OS_SOLARIS) 347 mAudioDriver = AudioDriverType_SolAudio; 348 #elif defined (RT_OS_LINUX) 349 # if defined (VBOX_WITH_PULSE) 350 /* Check for the pulse library & that the pulse audio daemon is running. */ 351 if (RTLdrIsLoadable ("libpulse.so.0") && 352 RTProcIsRunningByName ("pulseaudio")) 353 mAudioDriver = AudioDriverType_Pulse; 354 else 355 # endif /* VBOX_WITH_PULSE */ 356 # if defined (VBOX_WITH_ALSA) 357 /* Check if we can load the ALSA library */ 358 if (RTLdrIsLoadable ("libasound.so.2")) 359 mAudioDriver = AudioDriverType_ALSA; 360 else 361 # endif /* VBOX_WITH_ALSA */ 362 mAudioDriver = AudioDriverType_OSS; 363 #elif defined (RT_OS_DARWIN) 364 mAudioDriver = AudioDriverType_CoreAudio; 365 #elif defined (RT_OS_OS2) 366 mAudioDriver = AudioDriverType_MMP;; 367 #else 368 mAudioDriver = AudioDriverType_Null; 369 #endif 370 } 331 371 332 372 /**
Note:
See TracChangeset
for help on using the changeset viewer.