fix audio pop when returning to a game

This commit is contained in:
Daryl Borth 2018-08-23 08:57:30 -06:00
parent 3eebfa84fe
commit cff27827f7
2 changed files with 4 additions and 3 deletions

View File

@ -178,7 +178,10 @@ void PlaySound( int32 *Buffer, int count )
void UpdateSampleRate(int rate)
{
if(samplerate != rate) {
samplerate = rate;
FCEUI_Sound(samplerate);
}
}
void SetSampleRate()

View File

@ -636,7 +636,6 @@ ResetVideo_Emu ()
{
rmode = tvmodes[FCEUI_GetCurrentVidSystem(NULL, NULL)];
UpdateSampleRate(48220);
SetSampleRate();
}
else
{
@ -648,7 +647,6 @@ ResetVideo_Emu ()
ResetFbWidth(512, rmode);
UpdateSampleRate(48130);
SetSampleRate();
}
SetupVideoMode(rmode); // reconfigure VI