prevend weird asm.js error by reusing things

This commit is contained in:
Jakob Ketterl 2019-05-10 18:29:54 +02:00
parent 7427fa3608
commit b17364e701

View File

@ -1629,6 +1629,7 @@ function audio_preinit()
else if(audio_context.sampleRate>44100*4) else if(audio_context.sampleRate>44100*4)
audio_buffer_size = 4096 * 4; audio_buffer_size = 4096 * 4;
if (!audio_rebuffer) {
audio_rebuffer = new sdrjs.Rebuffer(audio_buffer_size,sdrjs.REBUFFER_FIXED); audio_rebuffer = new sdrjs.Rebuffer(audio_buffer_size,sdrjs.REBUFFER_FIXED);
audio_last_output_buffer = new Float32Array(audio_buffer_size); audio_last_output_buffer = new Float32Array(audio_buffer_size);
@ -1637,6 +1638,7 @@ function audio_preinit()
audio_calculate_resampling(audio_context.sampleRate); audio_calculate_resampling(audio_context.sampleRate);
audio_resampler = new sdrjs.RationalResamplerFF(audio_client_resampling_factor,1); audio_resampler = new sdrjs.RationalResamplerFF(audio_client_resampling_factor,1);
}
ws.send(JSON.stringify({"type":"dspcontrol","action":"start","params":{"output_rate":audio_server_output_rate}})); ws.send(JSON.stringify({"type":"dspcontrol","action":"start","params":{"output_rate":audio_server_output_rate}}));
} }