Skip to content

Commit 0a45223

Browse files
committed
Resuming a sound needs the onended handler adding back in again.
1 parent 59a72ff commit 0a45223

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/sound/Sound.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,11 @@ Phaser.Sound.prototype = {
789789
this._sound.loop = true;
790790
}
791791

792+
if (!this.loop && this.currentMarker === '')
793+
{
794+
this._sound.onended = this.onEndedHandler.bind(this);
795+
}
796+
792797
if (typeof this._sound.start === 'undefined')
793798
{
794799
this._sound.noteGrainOn(0, p, this.duration);

0 commit comments

Comments
 (0)