Skip to content

Commit b39f4fc

Browse files
1 parent fe99512 commit b39f4fc

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/sound/webaudio/WebAudioSoundManager.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,14 @@ var WebAudioSoundManager = new Class({
178178
this.masterVolumeNode = null;
179179
this.masterMuteNode.disconnect();
180180
this.masterMuteNode = null;
181-
this.context.suspend();
181+
if (this.game.config.audio && this.game.config.audio.context)
182+
{
183+
this.context.suspend();
184+
}
185+
else
186+
{
187+
this.context.close();
188+
}
182189
this.context = null;
183190
BaseSoundManager.prototype.destroy.call(this);
184191
}

0 commit comments

Comments
 (0)