add DSP halt/unhalt when switching between sound modes

This commit is contained in:
Daryl Borth 2018-08-14 15:38:54 -06:00
parent 007dbb6b4d
commit e138b27dea

View File

@ -118,7 +118,10 @@ SwitchAudioMode(int mode)
{ {
#ifndef NO_SOUND #ifndef NO_SOUND
ASND_Pause(1); ASND_Pause(1);
ASND_End();
AUDIO_StopDMA(); AUDIO_StopDMA();
AUDIO_RegisterDMACallback(NULL);
DSP_Halt();
AUDIO_SetDSPSampleRate(AI_SAMPLERATE_32KHZ); AUDIO_SetDSPSampleRate(AI_SAMPLERATE_32KHZ);
AUDIO_RegisterDMACallback(GCMixSamples); AUDIO_RegisterDMACallback(GCMixSamples);
#endif #endif
@ -135,6 +138,7 @@ SwitchAudioMode(int mode)
{ {
S9xSetSamplesAvailableCallback(NULL, NULL); S9xSetSamplesAvailableCallback(NULL, NULL);
#ifndef NO_SOUND #ifndef NO_SOUND
DSP_Unhalt();
ASND_Init(); ASND_Init();
ASND_Pause(0); ASND_Pause(0);
#else #else