mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-22 10:39:18 +01:00
add DSP halt/unhalt when switching between sound modes
This commit is contained in:
parent
3f080d6208
commit
7dd08ac408
@ -103,7 +103,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_RegisterDMACallback(AudioPlayer);
|
AUDIO_RegisterDMACallback(AudioPlayer);
|
||||||
#endif
|
#endif
|
||||||
memset(soundbuffer[0],0,3840);
|
memset(soundbuffer[0],0,3840);
|
||||||
@ -117,6 +120,7 @@ SwitchAudioMode(int mode)
|
|||||||
{
|
{
|
||||||
IsPlaying = 0;
|
IsPlaying = 0;
|
||||||
#ifndef NO_SOUND
|
#ifndef NO_SOUND
|
||||||
|
DSP_Unhalt();
|
||||||
ASND_Init();
|
ASND_Init();
|
||||||
ASND_Pause(0);
|
ASND_Pause(0);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user