【问题标题】:Adding master gain in to an Audio Graph在音频图表中添加主增益
【发布时间】:2015-08-10 14:34:49
【问题描述】:

我有一个使用网络音频 API 的音频混音器的简单实现。我基本上是为每个源创建一个缓冲区,添加一些过滤器,然后连接到目标:

this.track.connect(this.highPassFilter);
this.highPassFilter.connect(this.lowShelfFilter)
this.lowShelfFilter.connect(this.highShelfFilter)
this.highShelfFilter.connect(this.midFilter);
this.midFilter.connect(this.panner)
this.panner.connect(this.gain)
this.gain.connect(this.ctx.destination)

我想做的是能够创建一个主增益和主压缩器。看到我所有的“曲目”都直接连接到 context.destination ,然后在按下播放按钮时基本上都是一致播放的,我怎样才能将主增益连接到链中?

【问题讨论】:

    标签: audio webkit html5-audio web-audio-api


    【解决方案1】:

    我想你已经知道如何做到这一点了。您需要做的是创建您的主增益和压缩器,将这两者连接在一起,然后将所有轨道连接到它们,如下所示:

    [track] -> masterGain -> masterCompressor -> ctx.destination
    

    或者相反,但是你想要它(masterCompressor -> masterGain -> ctx.destination)。

    【讨论】:

    • 是的,当然,我想我的大脑昨天卡住了。现在所有的工作都像梦想一样成真。谢谢:)
    猜你喜欢
    • 2012-12-12
    • 2017-01-16
    • 2016-05-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-14
    • 2011-05-17
    • 1970-01-01
    • 2013-12-23
    相关资源
    最近更新 更多