From 7dd08ac408675a59f53cd6054ab1de64ea246e4a Mon Sep 17 00:00:00 2001 From: Daryl Borth Date: Tue, 14 Aug 2018 15:40:43 -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 0d0ef32..3f3d2f0 100644 --- a/source/audio.cpp +++ b/source/audio.cpp @@ -103,7 +103,10 @@ SwitchAudioMode(int mode) { #ifndef NO_SOUND ASND_Pause(1); + ASND_End(); AUDIO_StopDMA(); + AUDIO_RegisterDMACallback(NULL); + DSP_Halt(); AUDIO_RegisterDMACallback(AudioPlayer); #endif memset(soundbuffer[0],0,3840); @@ -117,6 +120,7 @@ SwitchAudioMode(int mode) { IsPlaying = 0; #ifndef NO_SOUND + DSP_Unhalt(); ASND_Init(); ASND_Pause(0); #else