From 6d1baab859042cc164893b9f8a0e455a18cccc8f Mon Sep 17 00:00:00 2001 From: dborth Date: Sat, 13 Jun 2009 17:50:07 +0000 Subject: [PATCH] change switch audio mode code --- source/ngc/audio.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/ngc/audio.cpp b/source/ngc/audio.cpp index 412c49f..85832cd 100644 --- a/source/ngc/audio.cpp +++ b/source/ngc/audio.cpp @@ -104,18 +104,18 @@ SwitchAudioMode(int mode) { #ifndef NO_SOUND ASND_Pause(1); - #endif AUDIO_StopDMA(); - AUDIO_SetDSPSampleRate(AI_SAMPLERATE_48KHZ); AUDIO_RegisterDMACallback(AudioPlayer); + #endif } else // menu { IsPlaying = 0; - AUDIO_StopDMA(); #ifndef NO_SOUND - ASND_SetDMACallback(); + ASND_Init(); ASND_Pause(0); + #else + AUDIO_StopDMA(); #endif } } @@ -141,12 +141,7 @@ void InitialiseSound() ***************************************************************************/ void ShutdownAudio() { - #ifndef NO_SOUND - ASND_Pause(1); - ASND_End(); - #endif AUDIO_StopDMA(); - AUDIO_RegisterDMACallback(NULL); } /****************************************************************************