mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +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);
|
||||
}
|
||||
);
|
||||
|
||||
this.context = null;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -96,7 +96,6 @@ var BaseSoundManager = new Class({
|
|||
this.onFocus();
|
||||
}
|
||||
}, this);
|
||||
|
||||
game.events.once('destroy', this.destroy, this);
|
||||
|
||||
/**
|
||||
|
@ -412,15 +411,12 @@ var BaseSoundManager = new Class({
|
|||
destroy: function ()
|
||||
{
|
||||
this.removeAllListeners();
|
||||
|
||||
this.forEachActiveSound(function (sound)
|
||||
{
|
||||
sound.destroy();
|
||||
});
|
||||
|
||||
this.sounds.length = 0;
|
||||
this.sounds = null;
|
||||
|
||||
this.game = null;
|
||||
},
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ var WebAudioSoundManager = new Class({
|
|||
var audioConfig = game.config.audio;
|
||||
if (audioConfig && audioConfig.context)
|
||||
{
|
||||
audioConfig.context.resume();
|
||||
return audioConfig.context;
|
||||
}
|
||||
return new AudioContext();
|
||||
|
|
Loading…
Reference in a new issue