From 09b80d65c64c9d6b576c653156904308e1f6203c Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Tue, 13 Feb 2024 11:08:57 -0800 Subject: [PATCH] Workaround chrome bug https://issues.chromium.org/u/1/issues/324293899 --- src/ByteBeatNode.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ByteBeatNode.js b/src/ByteBeatNode.js index 8790ca7..3325ff8 100644 --- a/src/ByteBeatNode.js +++ b/src/ByteBeatNode.js @@ -53,7 +53,9 @@ class BeatWorkletProcessor extends AudioWorkletProcessor { } process(inputs, outputs, parameters) { - this.byteBeat.process(outputs[0][0].length, outputs[0][0], outputs[0][1]); + if (outputs.length > 0) { + this.byteBeat.process(outputs[0][0].length, outputs[0][0], outputs[0][1]); + } return true; } }