Skip to content

Instantly share code, notes, and snippets.

@hoch
Created January 28, 2016 20:55
Show Gist options
  • Save hoch/4ae122d32df9222cd864 to your computer and use it in GitHub Desktop.
Save hoch/4ae122d32df9222cd864 to your computer and use it in GitHub Desktop.
Chrome WebAudio Snippets
var context = new AudioContext();
navigator.webkitGetUserMedia({
audio: true
}, function (stream) {
var source = context.createMediaStreamSource(stream);
source.channelCount = context.destination.maxChannelCount;
source.connect(context.destination);
}, function (error) {
console.log(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment