Skip to content

Commit

Permalink
oto: reduce buffer size on browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jul 28, 2024
1 parent ac2412e commit ac8b8b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class OtoWorkletProcessor extends AudioWorkletProcessor {
}
// If the buffer is short, request more data.
if (this.buf_.length < this.bufferSize_*this.channelCount_ && !this.waitRecv_) {
if (this.buf_.length < this.bufferSize_*this.channelCount_ / 2 && !this.waitRecv_) {
this.waitRecv_ = true;
this.port.postMessage(null);
}
Expand Down

0 comments on commit ac8b8b4

Please sign in to comment.