Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const recordNode = audioContext.createScriptProcessor(bufferSize, 2, 2);
- // an array for each channel
- const recording = [[], []];
- // note: we are filling recording with `chunks` here, so
- // the chunks would need to be reassembled into a single buffer when you're ready to export
- recordNode.onaudioprocess = ((e) => {
- recording[0].push(new Float32Array(e.inputBuffer.getChannelData(0)));
- recording[1].push(new Float32Array(e.inputBuffer.getChannelData(1)));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement