This commit is contained in:
jsemu2 2019-04-24 02:19:58 -04:00
parent ccc1a8200f
commit 5e48af37de

View file

@ -202,7 +202,8 @@ XAudioServer.prototype.initializeWebAudio = function () {
}
var parentObj = this;
XAudioJSWebAudioWatchDogTimer = setInterval(function () {
if(typeof XAudioJSWebAudioContextHandle.state != "undefined" && XAudioJSWebAudioContextHandle.state === 'suspended') {
if(typeof XAudioJSWebAudioContextHandle.state != "undefined") {
if (XAudioJSWebAudioContextHandle.state === 'suspended') {
XAudioJSWebAudioWatchDogLast = (new Date()).getTime();
try {
XAudioJSWebAudioContextHandle.resume();
@ -215,6 +216,7 @@ XAudioServer.prototype.initializeWebAudio = function () {
parentObj.initializeWebAudio();
}
}
}
}, 500);
}
if (this.userEventLatch && typeof XAudioJSWebAudioContextHandle.state != "undefined") {