From 7f6e43db180ba5f7facf435302b2341ed63569f8 Mon Sep 17 00:00:00 2001 From: Dmitry Vedenko Date: Mon, 13 Nov 2023 15:42:52 +0300 Subject: [PATCH] Attempt to fix stutters when overdubbing --- libraries/lib-audio-io/AudioIO.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/lib-audio-io/AudioIO.cpp b/libraries/lib-audio-io/AudioIO.cpp index c445922c1e37..d40dcf1e8178 100644 --- a/libraries/lib-audio-io/AudioIO.cpp +++ b/libraries/lib-audio-io/AudioIO.cpp @@ -2708,6 +2708,9 @@ bool AudioIoCallback::FillOutputBuffers( len = mPlaybackBuffers[iBuffer]->Discard(toGet); // keep going here. // we may still need to issue a paComplete. + + // Keep tempBufs initialized to avoid NaNs and Infs + memset(tempBufs[c], 0, framesPerBuffer * sizeof(float)); } else { len = mPlaybackBuffers[iBuffer]