Reputation: 691
What is the difference between CAStreamBasicDescription
and AudioStreamBasicDescription
? Thanks.
Upvotes: 5
Views: 3192
Reputation: 31
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
Upvotes: 3
Reputation: 1761
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.
Upvotes: 8