void MusicStartup( void ) { int32 status; int musicdevicetype; // if they chose None lets return if (MusicDevice < 0) { return; } else if (MusicDevice == 0) { musicdevicetype = ASS_AutoDetect; } else { musicdevicetype = MusicDevice - 1; } status = MUSIC_Init( musicdevicetype, 0 ); if ( status == MUSIC_Ok ) { MUSIC_SetVolume( MusicVolume ); } else { initprintf("Couldn't find selected sound card, or, error w/ sound card itself.\n"); SoundShutdown(); uninittimer(); uninitengine(); CONTROL_Shutdown(); CONFIG_WriteSetup(); KB_Shutdown(); uninitgroupfile(); //unlink("duke3d.tmp"); exit(-1); } }
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 S_MusicVolume(int32_t volume) { if (MusicIsWaveform && MusicVoice >= 0) FX_SetPan(MusicVoice, volume, volume, volume); MUSIC_SetVolume(volume); }
void MusicSetVolume(int volume) { if (MusicIsWaveform && MusicVoice >= 0) { //FX_SetVoiceVolume(MusicVoice, volume); } else if (!MusicIsWaveform) { MUSIC_SetVolume(volume); } }
void S_MusicStartup(void) { initprintf("Initializing music...\n"); if (MUSIC_Init(0, 0) == MUSIC_Ok || MUSIC_Init(1, 0) == MUSIC_Ok) { MUSIC_SetVolume(MASTER_VOLUME(ud.config.MusicVolume)); return; } initprintf("S_MusicStartup(): failed initializing\n"); }
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"); } }
void MusicStartup(void) { int32_t status; int devicetype; // if they chose None lets return if (MusicDevice < 0) { gs.MusicOn = FALSE; return; } else if (MusicDevice == 0) { devicetype = ASS_AutoDetect; } else { devicetype = MusicDevice - 1; } status = MUSIC_Init(devicetype, 0); if (status == MUSIC_Ok) { MusicInitialized = TRUE; MUSIC_SetVolume(gs.MusicVolume); } else { buildprintf("Music error: %s\n",MUSIC_ErrorString(MUSIC_ErrorCode)); gs.MusicOn = FALSE; } if (MusicInitialized) loadtmb(); }