构建更好的位置音频 [AudioQueue 操作]
我正在构建一个应用程序,它需要真正准确的位置音频,一直到建模耳间时间差 (ITD) 的水平,立体声通道之间的轻微延迟差异随着声音相对于听众的位置而变化。不幸的是,iPhone 的 OpenAL 实现没有此功能,SDK 中也没有提供延迟音频单元。
经过一番阅读后,我决定解决这个问题的最佳方法是通过操作 AudioQueue 来实现我自己的延迟(我还可以看到我未来的一些项目可能需要学习这些东西,所以这就像很好的学习借口)。然而,我根本没有任何低级音频编程的经验,当然也没有 AudioQueue 的经验。尝试同时学习:
a)音频处理的一般理论
和
b)AudioQueue 如何实现该理论的具体细节
,事实证明,要同时学习太多内容了:(
所以,我的问题是:
1)哪里有一个好地方开始学习 DSP 以及音频生成和处理的一般工作原理(深入到音频数据在内存中的结构方式、混音工作原理等)?
2)有什么好方法可以了解 AudioQueue 是如何做到这一点的?是否有任何好的示例说明如何从生成的环形缓冲区中读取数据,而不是像 Apple 的 SpeakHere 示例那样仅使用 AudioFileReadPackets
按需获取文件的位?
而且,最重要的是
3)是否有一种我忽略的更简单的方法?
I'm building an app that has a requirement for really accurate positional audio, down to the level of modelling inter-aural time difference (ITD), the slight delay difference between stereo channels that varies with a sound's position relative to a listener. Unfortunately, the iPhone's implementation of OpenAL doesn't have this feature, nor is a delay Audio Unit supplied in the SDK.
After a bit of reading around, I've decided that the best way to approach this problem is to implement my own delay by manipulating an AudioQueue (I can also see some projects in my future which may require learning this stuff, so this is as good an excuse to learn as any). However, I don't have any experience in low-level audio programming at all, and certainly none with AudioQueue. Trying to learn both:
a) the general theory of audio processing
and
b) the specifics of how AudioQueue implements that theory
is proving far too much to take in all at once :(
So, my questions are:
1) where's a good place to start learning about DSP and how audio generation and processing works in general (down to the level of how audio data is structured in memory, how mixing works, that kinda thing)?
2) what's a good way to get a feel for how AudioQueue does this? Are there any good examples of how to get it reading from a generated ring buffer, rather that just fetching bits of a file on-demand with AudioFileReadPackets
, like Apple's SpeakHere example does?
and, most importantly
3) is there a simpler way of doing this that I've overlooked?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您可能应该出现在 coreaudio-api 列表 (lists.apple.com) 上,Apple 的 Core Audio 工程师经常去那里。
Sounds like you should probably be on the coreaudio-api list (lists.apple.com), where Apple's Core Audio engineers hang out.
学习 DSP 基础知识及其应用的另一个重要资源是 Steven W. Smith 所著的《科学家和工程师数字信号处理指南》。可在 http://www.dspguide.com/ 在线免费获取,但您也可以订购印刷本。
我真的很喜欢作者如何以一种非常令人愉快的方式建立基础理论。
此外,您应该查看 Core Audio Public Utility,您可以在 /Developer/Extras/CoreAudio/PublicUtility 中找到它。它涵盖了使用 CoreAudio 所需的许多基本结构。
Another great resource for learning the fundamental basics of DSP and their applications is The Scientist and Engineer's Guide to Digital Signal Processing by Steven W. Smith. It is available online for free at http://www.dspguide.com/ but you can also order a printed copy.
I really like how the author builds up the fundamental theory in a way that very palatable.
Furthermore, you should check out the Core Audio Public Utility which you'll find at /Developer/Extras/CoreAudio/PublicUtility. It covers a lot of the basic structures you'll need to get in place in order to work with CoreAudio.