mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Merge branch 'master' of https://github.com/photonstorm/phaser
This commit is contained in:
commit
65e5b14276
3 changed files with 3 additions and 4 deletions
|
@ -82,6 +82,8 @@ var AudioFile = new Class({
|
||||||
callback(_this);
|
callback(_this);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.context = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -96,7 +96,6 @@ var BaseSoundManager = new Class({
|
||||||
this.onFocus();
|
this.onFocus();
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
game.events.once('destroy', this.destroy, this);
|
game.events.once('destroy', this.destroy, this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -412,15 +411,12 @@ var BaseSoundManager = new Class({
|
||||||
destroy: function ()
|
destroy: function ()
|
||||||
{
|
{
|
||||||
this.removeAllListeners();
|
this.removeAllListeners();
|
||||||
|
|
||||||
this.forEachActiveSound(function (sound)
|
this.forEachActiveSound(function (sound)
|
||||||
{
|
{
|
||||||
sound.destroy();
|
sound.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.sounds.length = 0;
|
this.sounds.length = 0;
|
||||||
this.sounds = null;
|
this.sounds = null;
|
||||||
|
|
||||||
this.game = null;
|
this.game = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ var WebAudioSoundManager = new Class({
|
||||||
var audioConfig = game.config.audio;
|
var audioConfig = game.config.audio;
|
||||||
if (audioConfig && audioConfig.context)
|
if (audioConfig && audioConfig.context)
|
||||||
{
|
{
|
||||||
|
audioConfig.context.resume();
|
||||||
return audioConfig.context;
|
return audioConfig.context;
|
||||||
}
|
}
|
||||||
return new AudioContext();
|
return new AudioContext();
|
||||||
|
|
Loading…
Reference in a new issue