如何将实时音频输入从getUserMedia()API转换为OSC(开放声音控制)数据包?

时间:2012-10-18 06:07:19

标签: audio-streaming html5-audio osc

我希望量化实时音频流并使用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 个答案:

没有答案