From 51caf3f4e3cef7432236eef7a3d8119d9499ee53 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 23 Jan 2022 19:53:50 -0800 Subject: [PATCH] Cog Audio: Don't overfill the output buffer when asked to reset the buffers --- Audio/Chain/Node.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Audio/Chain/Node.m b/Audio/Chain/Node.m index 7315d2dee..354a6a22c 100644 --- a/Audio/Chain/Node.m +++ b/Audio/Chain/Node.m @@ -54,9 +54,8 @@ { if (availOutput) { - // must unlock buffer before waiting, may as well write silence - memset(writePtr, 0, availOutput); - [buffer didWriteLength:availOutput]; + // Unlock the buffer + [buffer didWriteLength:0]; } [semaphore wait]; }