Re: Questions about AudioStreamBasicDescription
Re: Questions about AudioStreamBasicDescription
- Subject: Re: Questions about AudioStreamBasicDescription
- From: Brian Willoughby <email@hidden>
- Date: Sun, 1 Feb 2009 16:00:57 -0800
You are basically correct. AudioStreamBasicDescription is difficult
to use unless you're completely aware of the rules for valid and
consistent formats. There have been many emails on this list
detailing the finer aspects of how to get it right. However,
apparently the simplest thing is to just use the C++ class from the
Examples directories, and let it maintain the consistency of the
various fields in the ASBD structure. You can either use the class
directly, sneak a peek at its source to discover all of the rules, or
use the archives of this mailing list to learn how to create valid
structures.
In my code, I more often use AudioStreamBasicDescription directly.
However, I have run into many hurdles during the learning process.
Admittedly, I have used CAStreamBasicDescription in a few projects
where I simply did not want the hassle of getting all the details just
right, as long as it wasn't a greater hassle to incorporate C++ code
into my projects or frameworks.
In an ideal world, CAStreamBasicDescription would be an Objective C
class which lives in an Apple-supplied framework. That way, as Apple
improves the class, all third-party users of the class API would
benefit. As it stands now, the C++ sources are compiled into each
application, and whenever Apple discovers a bug or makes an
improvement, all third parties who have ever used
CAStreamBasicDescription must obtain the updated sources and recompile
their program for a maintenance release. Such is the different
between C++ and ObjC.
Brian Willoughby
Sound Consulting
On Feb 1, 2009, at 15:05, Fredrik wrote:
Isn´t the CAStreamBasicDescription a C++ class made for the example
only? I´m not trying to build the example code. I´m referring to a
struct called AudioStreamBasicDescription that AFAIK is part of
CoreAudio documented here.
http://developer.apple.com/documentation/MusicAudio/Reference/CACoreAudioReference/CoreAudioTypes/index.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden