mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
If you paused a Sound object that is using audio markers and then resumed it, it wouldn't correctly calculate the resume duration - causing the sound to sometimes play into the marker that followed it (thanks @AnderbergE #1669)
This commit is contained in:
parent
483bb240a6
commit
96e313e768
2 changed files with 5 additions and 2 deletions
|
@ -224,6 +224,7 @@ We've rolled our own fixes into our version of Pixi, ensuring we keep it as bug-
|
|||
* Animations are now guarded allowing Sprites with animations to be destroyed from within onUpdate, onLoop or onComplete events (thanks @pnstickne #1685 #1679)
|
||||
* Text.lineSpacing can now accept negative values without cutting the bottom of the Text object off. The value can never be less than the height of a single line of text (thanks @anthonysapp #1690)
|
||||
* Text.lineSpacing is no longer applied to the first line of Text, which prevents text from being cut off further down the Text object.
|
||||
* If you paused a Sound object that is using audio markers and then resumed it, it wouldn't correctly calculate the resume duration - causing the sound to sometimes play into the marker that followed it (thanks @AnderbergE #1669)
|
||||
|
||||
### Pixi 2.2.8 Bug Fixes
|
||||
|
||||
|
|
|
@ -794,14 +794,16 @@ Phaser.Sound.prototype = {
|
|||
this._sound.onended = this.onEndedHandler.bind(this);
|
||||
}
|
||||
|
||||
var duration = this.duration - (this.pausedPosition / 1000);
|
||||
|
||||
if (typeof this._sound.start === 'undefined')
|
||||
{
|
||||
this._sound.noteGrainOn(0, p, this.duration);
|
||||
this._sound.noteGrainOn(0, p, duration);
|
||||
//this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it
|
||||
}
|
||||
else
|
||||
{
|
||||
this._sound.start(0, p, this.duration);
|
||||
this._sound.start(0, p, duration);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue