From e138b27deaab44579f2111ef92bbf150db970ede Mon Sep 17 00:00:00 2001 From: Daryl Borth Date: Tue, 14 Aug 2018 15:38:54 -0600 Subject: [PATCH] add DSP halt/unhalt when switching between sound modes --- source/audio.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/audio.cpp b/source/audio.cpp index 1667ed9..b52493c 100644 --- a/source/audio.cpp +++ b/source/audio.cpp @@ -118,7 +118,10 @@ SwitchAudioMode(int mode) { #ifndef NO_SOUND ASND_Pause(1); + ASND_End(); AUDIO_StopDMA(); + AUDIO_RegisterDMACallback(NULL); + DSP_Halt(); AUDIO_SetDSPSampleRate(AI_SAMPLERATE_32KHZ); AUDIO_RegisterDMACallback(GCMixSamples); #endif @@ -135,6 +138,7 @@ SwitchAudioMode(int mode) { S9xSetSamplesAvailableCallback(NULL, NULL); #ifndef NO_SOUND + DSP_Unhalt(); ASND_Init(); ASND_Pause(0); #else