【发布时间】:2015-12-17 09:02:54
【问题描述】:
我有这段代码可以在我的麦克风和扬声器之间建立实时连接。是否可以实时改变我的声音音调?
navigator.getUserMedia(
{ audio: true },
function(stream) {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var ctx= new AudioContext();
// Create an AudioNode from the stream.
var mediaStreamSource = ctx.createMediaStreamSource( stream );
// Connect it to the destination to hear yourself (or any other node for processing!)
mediaStreamSource.connect( ctx.destination );
},
function(err) {
console.log(err);
}
);
【问题讨论】:
标签: javascript html web-audio-api