Skip to content

Commit

Permalink
fix: Removed redundant playbackend event from playback resume (#2906)
Browse files Browse the repository at this point in the history
Removed from Sound.ts, line 349, the emitting of playbackend on resume, was creating multiple events on track end
  • Loading branch information
jyoung4242 authored Jan 29, 2024
1 parent e397cbb commit 4d0ae42
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/engine/Resources/Sound/Sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ export class Sound implements Audio, Loadable<AudioBuffer> {
// ensure we resume *current* tracks (if paused)
for (const track of this._tracks) {
resumed.push(track.play().then(() => {
this.events.emit('playbackend', new NativeSoundEvent(this, track as WebAudioInstance));
this._tracks.splice(this.getTrackId(track), 1);
return true;
}));
Expand Down

0 comments on commit 4d0ae42

Please sign in to comment.