Resuming a sound needs the onended handler adding back in again.

This commit is contained in:
photonstorm 2015-02-27 11:57:24 +00:00
parent 59a72ffa80
commit 0a45223cd4

View file

@ -789,6 +789,11 @@ Phaser.Sound.prototype = {
this._sound.loop = true;
}
if (!this.loop && this.currentMarker === '')
{
this._sound.onended = this.onEndedHandler.bind(this);
}
if (typeof this._sound.start === 'undefined')
{
this._sound.noteGrainOn(0, p, this.duration);