Пример #1
0
bool systemSoundInit()
{
	if (theApp.sound)
		delete theApp.sound;

	extern ISound *newDirectSound();
	theApp.sound = newDirectSound();
	return theApp.sound->init();
}
Пример #2
0
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();
}