Update XAudioServer.js

This commit is contained in:
jsemu 2019-05-04 18:21:17 -04:00
parent f1736976a7
commit 50e16f3b6e

View file

@ -13,7 +13,7 @@ function XAudioServer(channels, sampleRate, minBufferSize, maxBufferSize, underR
XAudioJSCallbackAPIEventNotificationCallback2 = (typeof postheartbeatCallback == "function") ? postheartbeatCallback : null; XAudioJSCallbackAPIEventNotificationCallback2 = (typeof postheartbeatCallback == "function") ? postheartbeatCallback : null;
XAudioJSVolume = (volume >= 0 && volume <= 1) ? volume : 1; XAudioJSVolume = (volume >= 0 && volume <= 1) ? volume : 1;
this.failureCallback = (typeof failureCallback == "function") ? failureCallback : function () { throw(new Error("XAudioJS has encountered a fatal error.")); }; this.failureCallback = (typeof failureCallback == "function") ? failureCallback : function () { throw(new Error("XAudioJS has encountered a fatal error.")); };
this.userEventLatch = (typeof userEventLach == "function") ? userEventLatch : null; this.userEventLatch = (typeof userEventLach == "object") ? userEventLatch : null;
this.initializeAudio(); this.initializeAudio();
} }
XAudioServer.prototype.MOZWriteAudioNoCallback = function (buffer, upTo) { XAudioServer.prototype.MOZWriteAudioNoCallback = function (buffer, upTo) {