From e75dce254364cda52e482058393b52f3e66ee204 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 3 Jan 2019 17:23:29 -0800 Subject: [PATCH] Remove one-sample-per-callback write logic to fix crackling at 44.1 KHz. Fixes #152 --- app/streaming/audio/renderers/soundioaudiorenderer.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/streaming/audio/renderers/soundioaudiorenderer.cpp b/app/streaming/audio/renderers/soundioaudiorenderer.cpp index 47ff5c1e..a340f476 100644 --- a/app/streaming/audio/renderers/soundioaudiorenderer.cpp +++ b/app/streaming/audio/renderers/soundioaudiorenderer.cpp @@ -375,10 +375,6 @@ void SoundIoAudioRenderer::sioWriteCallback(SoundIoOutStream* stream, int frameC frameCountMin = qMax(frameCountMin, (int)(stream->sample_rate * k_MinSampleLengthSec)); frameCountMin = qMin(frameCountMin, frameCountMax); - // Clamp framesLeft to frameCountMin to ensure that we never write more than one sample. - // This makes sure that we never increase our latency beyond what the sink is consuming. - framesLeft = qMin(framesLeft, frameCountMin); - // Track latency on queueing-based backends if (me->m_SoundIo->current_backend != SoundIoBackendCoreAudio && me->m_SoundIo->current_backend != SoundIoBackendJack) { soundio_outstream_get_latency(stream, &me->m_Latency);