mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 21:54:17 +00:00
Fix the underflow caused by the underflow fix :(
This commit is contained in:
parent
8002c65693
commit
bef6c2b665
1 changed files with 8 additions and 1 deletions
|
@ -155,7 +155,14 @@ void SdlAudioRenderer::submitAudio(short* audioBuffer, int audioSize)
|
|||
{
|
||||
m_SampleIndex++;
|
||||
|
||||
Uint32 queuedAudio = qMax(SDL_GetQueuedAudioSize(m_AudioDevice) - m_BaselinePendingData, 0U);
|
||||
Uint32 queuedAudio = SDL_GetQueuedAudioSize(m_AudioDevice);
|
||||
if (queuedAudio > m_BaselinePendingData) {
|
||||
queuedAudio -= m_BaselinePendingData;
|
||||
}
|
||||
else {
|
||||
queuedAudio = 0;
|
||||
}
|
||||
|
||||
Uint32 framesQueued = queuedAudio / (SAMPLES_PER_FRAME * m_ChannelCount * sizeof(short));
|
||||
|
||||
// We must check this prior to the below checks to ensure we don't
|
||||
|
|
Loading…
Reference in a new issue