Skip to content

Commit

Permalink
Fix the audio event remove
Browse files Browse the repository at this point in the history
When the audio play done, the event key should be cleanup.
  • Loading branch information
yoki0805 committed Nov 22, 2024
1 parent 667005f commit 49c0c71
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pal/audio/operation-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function _tryCallingRecursively<T extends OperationQueueable> (target: T, opInfo
opInfo.invoking = false;
target._operationQueue.shift();
target._eventTarget.emit(opInfo.id.toString());
target._eventTarget.off(opInfo.id.toString()); // remove the key from _eventTarget._callbackTable
removeUnneededCalls(target);
const nextOpInfo: OperationInfo = target._operationQueue[0];
if (nextOpInfo) {
Expand Down

0 comments on commit 49c0c71

Please sign in to comment.