From b3c6dbcd158dc78bd26b0a58179eceeebb85528f Mon Sep 17 00:00:00 2001 From: Nodeful Date: Wed, 6 Oct 2021 13:28:36 +0300 Subject: [PATCH] driver buffer clean up fix --- native/driver/Source/EQMDevice.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/driver/Source/EQMDevice.swift b/native/driver/Source/EQMDevice.swift index f0962fd4..120064cf 100644 --- a/native/driver/Source/EQMDevice.swift +++ b/native/driver/Source/EQMDevice.swift @@ -646,7 +646,7 @@ class EQMDevice: EQMObject { // Clean up buffer let cleanPosition = sampleTime + Int(frame) - Int(ringBufferSize) - if (cleanPosition > 0) { + if (cleanPosition > -1) { let cleanRemainder = cleanPosition % Int(ringBufferSize) let cleanFrame = cleanRemainder * Int(kChannelCount) + Int(channel) buffer[cleanFrame] = 0