Skip to content

Commit

Permalink
driver buffer clean up fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nodeful committed Oct 6, 2021
1 parent 34ae184 commit b3c6dbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion native/driver/Source/EQMDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3c6dbc

Please sign in to comment.