mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-09-20 14:11:54 +00:00
Replace forgotten clamp to frameCountMax removed by e75dce2543
This commit is contained in:
parent
34aacc90d7
commit
11c7131875
1 changed files with 3 additions and 0 deletions
|
@ -369,6 +369,9 @@ void SoundIoAudioRenderer::sioWriteCallback(SoundIoOutStream* stream, int frameC
|
|||
(me->m_OpusChannelCount * stream->bytes_per_sample);
|
||||
int bytesRead = 0;
|
||||
|
||||
// Clamp framesLeft to frameCountMax
|
||||
framesLeft = qMin(framesLeft, frameCountMax);
|
||||
|
||||
// Ensure we always write at least a buffer, even if it's silence, to avoid
|
||||
// busy looping when no audio data is available while libsoundio tries to keep
|
||||
// us from starving the output device.
|
||||
|
|
Loading…
Reference in a new issue