How can I translate live audio input from getUserMedia() API to OSC(Open Sound Control) packets?

209 Views Asked by At

I am looking to quantize the live Audio stream and send it to another client using WebSockets.

navigator.getUserMedia({audio: true}, function(localMediaStream) {
var audio = document.querySelector('audio');
audio.src = window.URL.createObjectURL(localMediaStream);
// Get OSC every 25ms from localMediaStram?
// Note: onloadedmetadata doesn't fire in Chrome when using it with getUserMedia.
// See crbug.com/110938.
audio.onloadedmetadata = function(e) {
  // Ready to go. Do some stuff.
};

}, onError);

0

There are 0 best solutions below