【问题标题】:Web Audio Api Record audio nodeWeb Audio Api Record 音频节点
【发布时间】:2016-02-05 15:19:00
【问题描述】:

我可以用 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;
}

【问题讨论】:

  • 我应该如何使用recorderjs这个功能? node.start(currentTime + trackPosition - 光标、偏移量、持续时间);你能给我一段代码解释一下吗?

标签: audio web-audio-api


【解决方案1】:

查看https://github.com/mattdiamond/Recorderjs - 它让您可以将 Web 音频应用的输出录制/保存为 .wav,听起来就像您要找的一样!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-11-09
    • 1970-01-01
    • 2014-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-19
    • 2020-07-10
    相关资源
    最近更新 更多