当我需要自定义音频效果时,我是否需要处理音频单元,或者我可以依赖音频队列服务吗?

发布于 2024-12-28 03:01:12 字数 192 浏览 1 评论 0原文

据我了解,音频队列服务是比使用音频单元的音频单元更高级别的 API。 OpenAL 还使用音频单元。所以Audio Units是iOS中最底层的音频API。

我需要录制声音,然后将自定义过滤器应用于音频流并播放。音频队列服务似乎很适合录音,而且也可以用来回放。但我仍然不确定他们是否允许将自己的算法应用于音频流,就像 AURemoteIO 音频单元一样。

From my understanding Audio Queue Services are a higher level API than Audio Units, which use Audio Units. OpenAL also uses Audio Units. So Audio Units is the lowest level audio API in iOS.

I need to record a sound and then apply a custom filter to the audio stream and play it back. Audio Queue Services seem to be good for recording, and they can also be used to play it back. But I'm still uncertain about wether or not they allow to apply own algorithms to the audio stream, like the AURemoteIO audio unit would.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

掩耳倾听 2025-01-04 03:01:12

根据我个人(有时是痛苦的)经验,我认为将 AudioQueue 用于流式应用程序。对于其他任何事情,请使用 AudioUnit。后者可能级别较低,但我没有看到复杂性有太大差异。

老实说,AudioUnit 似乎更容易使用。

理论上,使用 AudioUnit 您应该能够使用其他插件来应用效果。然而,直到 iOS 5 AURemoteIO 都是唯一可用的 AudioUnit。显然 iOS 5 还有更多功能。我还没有机会检查。

如果您通过对缓冲区运行算法来手动完成此操作,您应该能够找到大量开源 DSP 代码。还有商业应用程序。 Dirac DSP 库是一个非常好的库,用于音高变换和时间拉伸。

这是关于在回答另一个问题时使用 AURemoteIO 的精彩教程:

停止并快速重播音频队列

From my personal - and sometimes painful - experience, I'd say use AudioQueue for streaming type applications. For anything else, use AudioUnit. The latter maybe lower level, but I didn't see much difference in complexity.

To be honest, AudioUnit seemed a lot more straightforward to work with.

Theoretically, with AudioUnit you should be able to use other plug-ins to apply effects. However, until iOS 5 AURemoteIO was the only AudioUnit available. Apparently there's more with iOS 5. I haven't had a chance to check yet.

If you're doing it manually by running an algorithm against the buffers, you should be able to find quite a lot of open source DSP code. There's also commercial apps. One really good library is the Dirac DSP lib for pitch shifting and time stretching.

Here's a great tutorial on using AURemoteIO in the answer to this other question:

Stopping and Quickly Replaying an AudioQueue

要走干脆点 2025-01-04 03:01:12

如果您录制并保存未压缩的音频,则可以在使用任何音频 API 之外将自己的自定义音频效果直接应用到捕获的音频缓冲区或文件。然后使用任何 iOS 音频 API 播放结果。

If you record and save uncompressed audio, you can apply your own custom audio effects directly to the captured audio buffer or file outside of using any audio API. Then play the result using any iOS audio API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文