Skip to content

Instantly share code, notes, and snippets.

Created April 25, 2014 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/11302966 to your computer and use it in GitHub Desktop.
Save anonymous/11302966 to your computer and use it in GitHub Desktop.
function exportWAV(){
var bufferL = mergeBuffers(recBuffersL, recLength);
var bufferR = mergeBuffers(recBuffersR, recLength);
var interleaved = interleave(bufferL, bufferR);
var dataview = encodeWAV(interleaved);
fs.writeFile("demo.wav", dataview.buffer, function(e) {
if (e) { console.log(e) }
else { console.log("Success") }
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment