Skip to content

Commit 1558dc8

Browse files
committed
start afresh on new audio in worklet
1 parent 92efac4 commit 1558dc8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react/src/worklets/audio-worklet.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ class AudioStreamProcessor extends AudioWorkletProcessor {
8181
switch (e.data?.type) {
8282
case 'audio':
8383
this._bq.push(new Float32Array(e.data.data));
84+
if (this._fadeOutActive) {
85+
this._fadeOutActive = false;
86+
this._fadeOutCounter = 0;
87+
}
8488
break;
8589
case 'end':
8690
this._shouldStop = true;

0 commit comments

Comments
 (0)