mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Implemented destroy method for WebAudioSoundManager class
This commit is contained in:
parent
9b0ed25a4d
commit
69b3348aca
1 changed files with 10 additions and 0 deletions
|
@ -113,6 +113,16 @@ var WebAudioSoundManager = new Class({
|
||||||
*/
|
*/
|
||||||
onFocus: function () {
|
onFocus: function () {
|
||||||
this.context.resume();
|
this.context.resume();
|
||||||
|
},
|
||||||
|
destroy: function () {
|
||||||
|
BaseSoundManager.prototype.destroy.call(this);
|
||||||
|
this.destination = null;
|
||||||
|
this.masterVolumeNode.disconnect();
|
||||||
|
this.masterVolumeNode = null;
|
||||||
|
this.masterMuteNode.disconnect();
|
||||||
|
this.masterMuteNode = null;
|
||||||
|
this.context.suspend();
|
||||||
|
this.context = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue