Added a protection in Qt/SDL sound to prevent audio buffer overflow during turbo mode.
This commit is contained in:
parent
c3b44910a0
commit
c719058991
|
@ -277,6 +277,12 @@ WriteSound(int32 *buf,
|
||||||
int udrFlowDup = 1;
|
int udrFlowDup = 1;
|
||||||
static int skipCounter = 0;
|
static int skipCounter = 0;
|
||||||
|
|
||||||
|
if ( NoWaiting & 0x01 )
|
||||||
|
{ // During Turbo mode, don't bother with sound as
|
||||||
|
// overflowing the audio buffer can cause delays.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( g_fpsScale >= 0.99995 )
|
if ( g_fpsScale >= 0.99995 )
|
||||||
{
|
{
|
||||||
uflowMode = 0;
|
uflowMode = 0;
|
||||||
|
|
Loading…
Reference in New Issue