void MusicStartup( void ) { int32 status; // if they chose None lets return if ((MusicDevice == NumSoundCards) || (eightytwofifty && numplayers > 1) ) return; // satisfy AWE32 and WAVEBLASTER stuff BlasterConfig.Midi = MidiPort; // Do special Sound Blaster, AWE32 stuff if ( ( FXDevice == SoundBlaster ) || ( FXDevice == Awe32 ) ) { int MaxVoices; int MaxBits; int MaxChannels; FX_SetupSoundBlaster ( BlasterConfig, (int *)&MaxVoices, (int *)&MaxBits, (int *)&MaxChannels ); } status = MUSIC_Init( MusicDevice, MidiPort ); if ( status == MUSIC_Ok ) { MUSIC_SetVolume( MusicVolume ); } else soundexit("Couldn't find selected sound card."); }
void SoundStartup( void ) { int32 status; // if they chose None lets return if (FXDevice == NumSoundCards) return; // Do special Sound Blaster, AWE32 stuff if ( ( FXDevice == SoundBlaster ) || ( FXDevice == Awe32 ) ) { int MaxVoices; int MaxBits; int MaxChannels; status = FX_SetupSoundBlaster ( BlasterConfig, (int *)&MaxVoices, (int *)&MaxBits, (int *)&MaxChannels ); } else { status = FX_Ok; } if ( status == FX_Ok ) { if ( eightytwofifty && numplayers > 1) { status = FX_Init( FXDevice, min( NumVoices,4 ), 1, 8, 8000 ); } else { status = FX_Init( FXDevice, NumVoices, NumChannels, NumBits, MixRate ); } if ( status == FX_Ok ) { FX_SetVolume( FXVolume ); if (ReverseStereo == 1) FX_SetReverseStereo(!FX_GetReverseStereo()); } } if ( status != FX_Ok ) soundexit("Error initializing sound."); status = FX_SetCallBack( TestCallBack ); if ( status != FX_Ok ) soundexit("Error initializing sound."); }
void MusicStartup( void ) { int32 status; // if they chose None lets return if ((MusicDevice == NumSoundCards) || (eightytwofifty && numplayers > 1) ) { return; } // satisfy AWE32 and WAVEBLASTER stuff BlasterConfig.Midi = MidiPort; // Do special Sound Blaster, AWE32 stuff if ( ( FXDevice == SoundBlaster ) || ( FXDevice == Awe32 ) ) { int MaxVoices; int MaxBits; int MaxChannels; FX_SetupSoundBlaster ( BlasterConfig, (int *)&MaxVoices, (int *)&MaxBits, (int *)&MaxChannels ); } status = MUSIC_Init( MusicDevice, MidiPort ); if ( status == MUSIC_Ok ) { MUSIC_SetVolume( MusicVolume ); } else { SoundShutdown(); uninittimer(); uninitengine(); CONTROL_Shutdown(); CONFIG_WriteSetup(); KB_Shutdown(); uninitgroupfile(); unlink("duke3d.tmp"); Error(EXIT_FAILURE, "Couldn't find selected sound card, or, error w/ sound card itself\n"); } }