// static Context* Context::master() { if( ! sMasterContext ) { #if defined( CINDER_COCOA ) sMasterContext.reset( new cocoa::ContextAudioUnit() ); #elif defined( CINDER_MSW ) #if( _WIN32_WINNT >= _WIN32_WINNT_VISTA ) sMasterContext.reset( new msw::ContextWasapi() ); #else sMasterContext.reset( new msw::ContextXAudio() ); #endif #endif if( ! sIsRegisteredForShutdown ) registerClearStatics(); } return sMasterContext.get(); }
// static DeviceManager* Context::deviceManager() { if( ! sDeviceManager ) { #if defined( CINDER_MAC ) sDeviceManager.reset( new cocoa::DeviceManagerCoreAudio() ); #elif defined( CINDER_COCOA_TOUCH ) sDeviceManager.reset( new cocoa::DeviceManagerAudioSession() ); #elif defined( CINDER_MSW ) #if( _WIN32_WINNT > _WIN32_WINNT_VISTA ) sDeviceManager.reset( new msw::DeviceManagerWasapi() ); //#else // CI_ASSERT( 0 && "TODO: simple DeviceManagerXp" ); #endif #endif if( ! sIsRegisteredForShutdown ) registerClearStatics(); } return sDeviceManager.get(); }
// static Context* Context::master() { if( ! sMasterContext ) { #if defined( CINDER_COCOA ) sMasterContext.reset( new cocoa::ContextAudioUnit() ); #elif defined( CINDER_MSW ) #if( _WIN32_WINNT >= 0x0600 ) // requires Windows Vista+ sMasterContext.reset( new msw::ContextWasapi() ); #else sMasterContext.reset( new msw::ContextXAudio() ); #endif #elif defined( CINDER_ANDROID ) sMasterContext.reset( new android::ContextOpenSl() ); #elif defined( CINDER_LINUX ) sMasterContext.reset( new linux::ContextPulseAudio() ); #endif if( ! sIsRegisteredForCleanup ) registerClearStatics(); } return sMasterContext.get(); }
// static DeviceManager* Context::deviceManager() { if( ! sDeviceManager ) { #if defined( CINDER_MAC ) sDeviceManager.reset( new cocoa::DeviceManagerCoreAudio() ); #elif defined( CINDER_COCOA_TOUCH ) sDeviceManager.reset( new cocoa::DeviceManagerAudioSession() ); #elif defined( CINDER_MSW ) #if( _WIN32_WINNT > 0x0600 ) // requires Windows Vista+ sDeviceManager.reset( new msw::DeviceManagerWasapi() ); //#else // CI_ASSERT( 0 && "TODO: simple DeviceManagerXp" ); #endif #elif defined( CINDER_ANDROID ) sDeviceManager.reset( new android::DeviceManagerOpenSl() ); #elif defined( CINDER_LINUX ) sDeviceManager.reset( new linux::DeviceManagerPulseAudio() ); #endif if( ! sIsRegisteredForCleanup ) registerClearStatics(); } return sDeviceManager.get(); }