Added a protection in Qt/SDL sound to prevent audio buffer overflow during turbo mode.

This commit is contained in:
mjbudd77 2021-08-20 22:10:09 -04:00
parent c3b44910a0
commit c719058991
1 changed files with 6 additions and 0 deletions

View File

@ -277,6 +277,12 @@ WriteSound(int32 *buf,
int udrFlowDup = 1;
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 )
{
uflowMode = 0;