mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-28 03:31:49 +01:00
change switch audio mode code
This commit is contained in:
parent
1a5885f0ce
commit
6d1baab859
@ -104,18 +104,18 @@ SwitchAudioMode(int mode)
|
|||||||
{
|
{
|
||||||
#ifndef NO_SOUND
|
#ifndef NO_SOUND
|
||||||
ASND_Pause(1);
|
ASND_Pause(1);
|
||||||
#endif
|
|
||||||
AUDIO_StopDMA();
|
AUDIO_StopDMA();
|
||||||
AUDIO_SetDSPSampleRate(AI_SAMPLERATE_48KHZ);
|
|
||||||
AUDIO_RegisterDMACallback(AudioPlayer);
|
AUDIO_RegisterDMACallback(AudioPlayer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else // menu
|
else // menu
|
||||||
{
|
{
|
||||||
IsPlaying = 0;
|
IsPlaying = 0;
|
||||||
AUDIO_StopDMA();
|
|
||||||
#ifndef NO_SOUND
|
#ifndef NO_SOUND
|
||||||
ASND_SetDMACallback();
|
ASND_Init();
|
||||||
ASND_Pause(0);
|
ASND_Pause(0);
|
||||||
|
#else
|
||||||
|
AUDIO_StopDMA();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -141,12 +141,7 @@ void InitialiseSound()
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
void ShutdownAudio()
|
void ShutdownAudio()
|
||||||
{
|
{
|
||||||
#ifndef NO_SOUND
|
|
||||||
ASND_Pause(1);
|
|
||||||
ASND_End();
|
|
||||||
#endif
|
|
||||||
AUDIO_StopDMA();
|
AUDIO_StopDMA();
|
||||||
AUDIO_RegisterDMACallback(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user