var socket; var audioCtx = new window.AudioContext(); var source = audioCtx.createBufferSource(); var total_raw; function appendBuffer(buffer1, buffer2) { let numberOfChannels = Math.min( buffer1.numberOfChannels, buffer2.numberOfChannels ); let tmp = audioCtx.createBuffer( numberOfChannels, (buffer1.length + buffer2.length), buffer1.sampleRate ); for (let i=0; i