fix crash in cores than send audio early

This commit is contained in:
Toad King 2018-01-14 20:46:08 -06:00
parent fd3ef0ec9c
commit 7b3554fd3c

View File

@ -23,7 +23,7 @@ var LibraryRWebAudio = {
getCurrentPerfTime: function() { getCurrentPerfTime: function() {
if (RA.startTime) return (window['performance']['now']() - RA.startTime) / 1000; if (RA.startTime) return (window['performance']['now']() - RA.startTime) / 1000;
else throw 'getCurrentPerfTime() called before start time set'; else return 0;
}, },
process: function(queueBuffers) { process: function(queueBuffers) {
@ -97,7 +97,7 @@ var LibraryRWebAudio = {
Module["pauseMainLoop"](); Module["pauseMainLoop"]();
return 1; return 1;
}, },
RWebAudioSampleRate: function() { RWebAudioSampleRate: function() {
return RA.context.sampleRate; return RA.context.sampleRate;
}, },