/*** gx_audio_Start This function restarts the audio engine This is called when coming back from Main Menu ***/ void gx_audio_Start(void) { /* shutdown background music */ PauseOgg(1); StopOgg(); /* shutdown menu audio processing */ ASND_Pause(1); ASND_End(); AUDIO_StopDMA(); AUDIO_RegisterDMACallback(NULL); DSP_Halt(); /* DMA Interrupt callback */ AUDIO_RegisterDMACallback(ai_callback); /* emulation is synchronized with audio hardware by default */ audioSync = AUDIO_WAIT; /* reset emulation audio processing */ memset(soundbuffer, 0, sizeof(soundbuffer)); audioWait = 0; bufferSize = 0; bufferIndex = 0; }
/*** gx_audio_Start This function restart the audio engine This is called when coming back from Main Menu ***/ void gx_audio_Start(void) { /* shutdown background music */ PauseOgg(1); StopOgg(); /* shutdown menu audio processing */ ASND_Pause(1); AUDIO_StopDMA(); AUDIO_RegisterDMACallback(NULL); DSP_Halt(); /* when not using 60hz mode, frame emulation is synchronized with Audio Interface DMA */ if (gc_pal | vdp_pal) { AUDIO_RegisterDMACallback(ai_callback); } /* reset emulation audio processing */ memset(soundbuffer, 0, 2 * 3840); audioStarted = 0; mixbuffer = 0; }