Cog Audio: Don't overfill the output buffer when asked to reset the buffers

CQTexperiment
Christopher Snowhill 2022-01-23 19:53:50 -08:00
parent d364d48944
commit 51caf3f4e3
1 changed files with 2 additions and 3 deletions

View File

@ -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];
}