Skip to content

Commit

Permalink
Cog Audio: Don't overfill the output buffer when asked to reset the b…
Browse files Browse the repository at this point in the history
…uffers
  • Loading branch information
kode54 committed Jan 24, 2022
1 parent d364d48 commit 51caf3f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Audio/Chain/Node.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ - (int)writeData:(void *)ptr amount:(int)amount
{
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];
}
Expand Down

0 comments on commit 51caf3f

Please sign in to comment.