mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Replaced stop method call with logic needed to stop sound in order to avoiding dispatching both stop and ended events
This commit is contained in:
parent
89fce9135a
commit
4210898a24
1 changed files with 2 additions and 1 deletions
|
@ -244,7 +244,8 @@ var WebAudioSound = new Class({
|
|||
update: function (time, delta) {
|
||||
if (this.hasEnded) {
|
||||
this.hasEnded = false;
|
||||
this.stop();
|
||||
BaseSound.prototype.stop.call(this);
|
||||
this.stopAndRemoveBufferSource();
|
||||
this.events.dispatch(new SoundEvent(this, 'SOUND_ENDED'));
|
||||
}
|
||||
else if (this.hasLooped) {
|
||||
|
|
Loading…
Reference in a new issue