AudioStream: Fix several-second-looping bug on underrun

This commit is contained in:
Connor McLaughlin 2022-09-18 11:56:22 +10:00
parent ef3ad91ad0
commit 239b585d8c
1 changed files with 3 additions and 2 deletions

View File

@ -116,9 +116,10 @@ void AudioStream::ReadFrames(s16* bData, u32 nFrames)
Log_VerbosePrintf("Underrun compensation done (%d frames buffered)", toFill);
}
}
else if (available_frames < nFrames)
if (available_frames < frames_to_read)
{
silence_frames = nFrames - available_frames;
silence_frames = frames_to_read - available_frames;
frames_to_read = available_frames;
m_filling = true;