RtAudio 或 PortAudio,该使用哪一个?
我正在考虑 RTAudio + RTMidi 和 PortAudio + PortMidi 用于需要实时音频和 midi 处理的新项目。有使用这两个库经验的人可以推荐其中一个吗?为什么? 与 C API 相比,我更喜欢 C++ API,但这不足以让我做出决定。
I'm considering RTAudio + RTMidi and PortAudio + PortMidi for a new project that requires realtime audio and midi procesing. Can anyone with experience using both libraries recommend one over the other? why?
I prefer a C++ API over a C API but this is not enough for me to make a decision.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
很长一段时间以来,我一直在锁定与这种需求的完美匹配。
现在我更喜欢
端口音频:
rt audio
当谷歌搜索答案时
:
Qt:
Juce:
I have been locking for the perfect match with that need for a quite long time.
For now I prefer
port audio:
rt audio
when googling for answers
other solutions :
Qt :
Juce:
这是 Linux 音频开发列表中出现的相关主题。我为我的新应用程序采取的方法是为 jack 编写代码并在 linux+jack 中进行所有调试,然后对我最终发布的端口使用 RTAudio。
万岁!
使用portaudio获取jack采样率和缓冲区大小
Here's a relevant thread that came up on the Linux audio devel list. The approach I'll take for my new app(s) is to code for jack and do all my debugging in linux+jack and then use RTAudio for the ports I end up releasing.
Salud!
Getting jack sample rate and buffersize with portaudio
PortAudio Java 绑定过于简单化。例如,您无法为设备访问设置独占模式或共享模式,这是一种耻辱,因为它实际上会减少您 7 毫秒的延迟 - 特别是当您在 Windows 10 下捕获麦克风输入(通常不需要共享访问)时。如果计算输出,您会损失 14 毫秒 RTT 来监控麦克风/其他设备。
RtAudio 现在似乎有 WASAPI 支持,但我不确定它是否比 PortAudio 更好。但是有 Java 绑定吗?我知道,这个问题没有被问到,但仍然......:)
另一个相当新的项目是 XtAudio。它将设备的独占和共享访问作为不同的设备集暴露给前端,并且通常似乎具有更好的 API 支持。不过,我认为它不支持 MIDI。
The PortAudio Java bindings are oversimplified. For example, you cannot set exclusive mode or shared mode for device access, which is a shame because it effectively steals 7ms of less latency from you -- especially if you capture microphone input (where usually no shared access is necessary) under Windows 10. If you count in output, you lose out on 14 ms RTT for monitoring your mic/stuff.
RtAudio seems to have WASAPI support now, but I'm not sure if it's better than PortAudio's. But are there Java bindings? Wasn't asked in the question, I know, but still ... :)
Another, rather new project is XtAudio. It exposes exclusive and shared access to devices as different sets of devices to the frontend and in general seems to have a better API support. Don't think it supports MIDI tho.