mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-27 11:11:50 +01:00
fix audio restarting when returning from menu
This commit is contained in:
parent
2409162991
commit
e716bb9ca6
@ -60,7 +60,7 @@ static int MIXER_GetSamples(u8 *dstbuffer, int maxlen)
|
|||||||
|
|
||||||
static void AudioPlayer()
|
static void AudioPlayer()
|
||||||
{
|
{
|
||||||
if ( !ConfigRequested )
|
if (!ConfigRequested)
|
||||||
{
|
{
|
||||||
int len = MIXER_GetSamples(soundbuffer[whichab], 3200);
|
int len = MIXER_GetSamples(soundbuffer[whichab], 3200);
|
||||||
DCFlushRange(soundbuffer[whichab],len);
|
DCFlushRange(soundbuffer[whichab],len);
|
||||||
@ -113,6 +113,7 @@ SwitchAudioMode(int mode)
|
|||||||
{
|
{
|
||||||
AUDIO_StopDMA();
|
AUDIO_StopDMA();
|
||||||
AUDIO_RegisterDMACallback(NULL);
|
AUDIO_RegisterDMACallback(NULL);
|
||||||
|
IsPlaying = 0;
|
||||||
#ifndef NO_SOUND
|
#ifndef NO_SOUND
|
||||||
ASND_Init();
|
ASND_Init();
|
||||||
ASND_Pause(0);
|
ASND_Pause(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user