explicitly fill buffer with 0s to avoid noise on newer chrome versions
This commit is contained in:
parent
87ba4ea524
commit
7d509eeb48
@ -33,7 +33,10 @@ class OwrxAudioProcessor extends AudioWorkletProcessor {
|
||||
this.port.start();
|
||||
}
|
||||
process(inputs, outputs) {
|
||||
if (this.remaining() < 128) return true;
|
||||
if (this.remaining() < 128) {
|
||||
outputs[0].forEach(output => output.fill(0));
|
||||
return true;
|
||||
}
|
||||
outputs[0].forEach((output) => {
|
||||
output.set(this.audioBuffer.subarray(this.outPos, this.outPos + 128));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user