diff --git a/player/src/audio/ring.ts b/player/src/audio/ring.ts index 3eaef49..7c95144 100644 --- a/player/src/audio/ring.ts +++ b/player/src/audio/ring.ts @@ -50,7 +50,9 @@ export class Ring { planeIndex: i, frameCount: count, }) - } else { + //audio seems to be breaking whenever endIndex is 0 + //this works, without "chopiness" + } else if (startIndex >= endIndex && endIndex != 0) { const first = channel.subarray(startIndex) const second = channel.subarray(0, endIndex) @@ -59,15 +61,12 @@ export class Ring { frameCount: first.length, }) - //For some reason this breaks audio... and this is my temporary fix //console.log("frame offset", first.length , "frame count", second.length) to test - if (first.length < second.length) { frame.copyTo(second, { planeIndex: i, frameOffset: first.length, frameCount: second.length, }) - } } }