VST 前瞻和 setInitialDelay()
我想我需要在我的 VST 中实现一个前瞻系统,但以前从未这样做过。我知道 setInitialDelay(foo) 被放置在构造函数中,然后缓冲音频,但我不确定是否读取“当前”音频和“前瞻”.....
I think I need to implement a lookahead system in my VST but have never done it before. I know setInitialDelay(foo) is placed in the constructor and then you buffer audio but I'm not sure were a read from for the 'current' audio and for the 'lookahead'.....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以我已经在评论中列出了这一切,但我应该回答这个问题。
我将 setInitialDelay() 设置为 100。然后我填充了 100 个样本大小的缓冲区并在 2 个点处读取。前瞻从音频进入系统的 0 点开始读取。 “实时”音频(用户听到的)始终比前瞻落后 100 步。
这很适合我的要求。只需确保所有数组值都已初始化,否则扬声器中会发出一些可怕的噪音。
So I've laid this all out in my comments but though I should answer this.
I set setInitialDelay() to 100. Then I filled a 100 sample size buffer and read from it at 2 points. The lookahead read from the 0 point where the audio was entering the system. The 'live' audio (that the user hears) was always 100 steps behind the lookahead.
This works well for my requirements. Just make sure that all the array values are initialized otherwise there will be some horrible noise coming out your speakers.