Skip to content

Instantly share code, notes, and snippets.

@kypflug
Created June 11, 2015 22:08
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 kypflug/52efb8cc728db6a77a45 to your computer and use it in GitHub Desktop.
Save kypflug/52efb8cc728db6a77a45 to your computer and use it in GitHub Desktop.
var audioContext = new AudioContext();
navigator.mediaDevices.getUserMedia({
audio: true
}).then(function (stream) {
var sourceNode = audioContext.createMediaStreamSource(stream);
var gainNode = audioContext.createGain();
sourceNode.connect(gainNode);
}).catch( function (error) {
console.log(error.name + ": " + error.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment