Skip to content

Commit 456fbfb

Browse files
clearer formatting
1 parent 7f60173 commit 456fbfb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/livekit-rtc/src/audio_source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class AudioSource {
115115
const now = Number(process.hrtime.bigint() / BigInt(1000000));
116116
const elapsed = this.lastCapture === 0 ? 0 : now - this.lastCapture;
117117
const frameDurationMs = (frame.samplesPerChannel / frame.sampleRate) * 1000;
118-
this.currentQueueSize = frameDurationMs + Math.max(this.currentQueueSize - elapsed, 0);
118+
this.currentQueueSize = Math.max(this.currentQueueSize - elapsed, 0) + frameDurationMs;
119119

120120
this.lastCapture = now;
121121

0 commit comments

Comments
 (0)