mirror of
https://github.com/dborth/fceugx.git
synced 2024-11-01 06:55:05 +01:00
fix audio pop when returning to a game
This commit is contained in:
parent
3eebfa84fe
commit
cff27827f7
@ -178,7 +178,10 @@ void PlaySound( int32 *Buffer, int count )
|
|||||||
|
|
||||||
void UpdateSampleRate(int rate)
|
void UpdateSampleRate(int rate)
|
||||||
{
|
{
|
||||||
samplerate = rate;
|
if(samplerate != rate) {
|
||||||
|
samplerate = rate;
|
||||||
|
FCEUI_Sound(samplerate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSampleRate()
|
void SetSampleRate()
|
||||||
|
@ -636,7 +636,6 @@ ResetVideo_Emu ()
|
|||||||
{
|
{
|
||||||
rmode = tvmodes[FCEUI_GetCurrentVidSystem(NULL, NULL)];
|
rmode = tvmodes[FCEUI_GetCurrentVidSystem(NULL, NULL)];
|
||||||
UpdateSampleRate(48220);
|
UpdateSampleRate(48220);
|
||||||
SetSampleRate();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -648,7 +647,6 @@ ResetVideo_Emu ()
|
|||||||
ResetFbWidth(512, rmode);
|
ResetFbWidth(512, rmode);
|
||||||
|
|
||||||
UpdateSampleRate(48130);
|
UpdateSampleRate(48130);
|
||||||
SetSampleRate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetupVideoMode(rmode); // reconfigure VI
|
SetupVideoMode(rmode); // reconfigure VI
|
||||||
|
Loading…
Reference in New Issue
Block a user