CAStreamBasicDescription 和 AudioStreamBasicDescription 有什么区别?

发布于 2024-09-29 13:12:45 字数 99 浏览 2 评论 0原文

CAStreamBasicDescriptionAudioStreamBasicDescription 之间有什么区别?谢谢。

What is the difference between CAStreamBasicDescription and AudioStreamBasicDescription? Thanks.

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

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

发布评论

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

评论(2

雨后彩虹 2024-10-06 13:12:45

CAStreamBasicDescription 只是 AudioStreamBasicDescription 的包装类。只需查看 .h 文件,通常位于:
/Developer/Extras/CoreAudio/PublicUtility/

我一般不使用CAStreamBasicDescription,而是直接使用AudioStreamBasicDescription。如果您正在寻找有关如何填充 AudioStreamBasicDescription 结构的帮助,只需使用函数 FillOutASBDForLPCM 即可。

CAStreamBasicDescription is just a wrapper class around AudioStreamBasicDescription. Just look at the .h file usually located at:
/Developer/Extras/CoreAudio/PublicUtility/

I usually don't use CAStreamBasicDescription, but use AudioStreamBasicDescription directly. If you are looking for little help on how to fill the AudioStreamBasicDescription structure just use the function FillOutASBDForLPCM.

幽蝶幻影 2024-10-06 13:12:45

与第一个答案相反,我建议每个人都使用 CAStreamBasicDescription ,除非您对 CoreAudio、流格式以及它们如何应用于每个平台上的音频单元和图形完全有经验。通过使用包装器及其许多健全性检查和调试功能可以避免很多问题。

还应尽可能使用核心音频实用程序,以减少在使用某些核心音频对象时需要自己编写的代码行数。如果不出意外,您应该使用这个不错的代码库作为学习 Core Audio 一些内部结构的工具。

http://developer.apple.com/library/ios/samplecode /CoreAudioUtilityClasses/Introduction/Intro.html

Contrary to the first answer I would recommend everyone use CAStreamBasicDescription unless you are completely experienced with CoreAudio, stream formats and how these apply to audio units, and graphs on each platform. So many problems can be avoided by using the wrapper and its many sanity checking and debugging features.

Core Audio Utilities should also be used whenever possible to cut down the number of lines of code you need to write yourself when working with certain Core Audio objects. If nothing else you should use this nice code base as a learning tool to some of the innards of Core Audio.

http://developer.apple.com/library/ios/samplecode/CoreAudioUtilityClasses/Introduction/Intro.html

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