Update XAudioServer.js

This commit is contained in:
jsemu 2019-04-27 03:18:22 -04:00
parent 86830a38f9
commit b24d7c6fca

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 == "object") ? userEventLatch : null; this.userEventLatch = (typeof userEventLach == "function") ? userEventLatch : null;
this.initializeAudio(); this.initializeAudio();
} }
XAudioServer.prototype.MOZWriteAudioNoCallback = function (buffer, upTo) { XAudioServer.prototype.MOZWriteAudioNoCallback = function (buffer, upTo) {