Skip to content

Instantly share code, notes, and snippets.

@kosso
Created October 2, 2017 16:47
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 kosso/7cd06b19839f45355574449eb5a6a70e to your computer and use it in GitHub Desktop.
Save kosso/7cd06b19839f45355574449eb5a6a70e to your computer and use it in GitHub Desktop.
..
processor = audio_context.createScriptProcessor(0, 1, 1);
processor.onaudioprocess = function (event) {
var array_left = event.inputBuffer.getChannelData(0);
var array_right = event.inputBuffer.getChannelData(1);
// ....
};
// Begin retrieving microphone data.
audio_context.microphone.connect(processor);
processor.connect(audio_context.destination);
..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment