我可以用trackPosition,offset以某种方式记录并输出到WAV。它在浏览器中播放工作正常工作正常我只想输出到WAV文件。
for (var i = 0; i <= loop; ++i) {
node = that.context.createBufferSource();
that.nodes.push(node);
node.buffer = clip.get('buffer');
node.connect(gainNode);
// clip offset and duration times
if (loop > 0) {
if (i === 0) { // first subclip
offset = startTime;
duration = duration - offset;
} else if (i === loop) { // last subclip
offset = 0;
duration = endTime;
} else {
offset = 0;
duration = clip.get('buffer').duration;
}
} else { // loop === 0
offset = startTime;
if (inClipStart)
duration = endTime - startTime;
else
duration = clip.clipLength();
}
// sets the clip's playback start time
node.start(
currentTime + trackPosition - cursor,
offset,
duration
);
trackPosition += duration;
}
答案 0 :(得分:0)
结帐https://github.com/mattdiamond/Recorderjs - 它让您将网络音频应用的输出录制/保存为.wav,听起来就像您正在寻找的那样!