bool systemSoundInit() { if (theApp.sound) delete theApp.sound; extern ISound *newDirectSound(); theApp.sound = newDirectSound(); return theApp.sound->init(); }
bool soundInit() { if( S_OK != CoInitializeEx( NULL, COINIT_APARTMENTTHREADED ) ) { puts("IDS_COM_FAILURE"); // systemMessage( IDS_COM_FAILURE, NULL ); } soundDriver = newDirectSound();//systemSoundInit(); if ( !soundDriver ) return false; if (!soundDriver->init(44100)) return false; soundDriver->resume(); }