Re: Why is CoreAudio C++ not Objective-C?
Re: Why is CoreAudio C++ not Objective-C?
- Subject: Re: Why is CoreAudio C++ not Objective-C?
- From: Paul Davis <email@hidden>
- Date: Thu, 21 Oct 2010 10:37:29 -0400
On Thu, Oct 21, 2010 at 1:46 AM, B.J. Buchalter <email@hidden> wrote:
> As Christopher notes, CoreAudio is a C API, not a C++ API. A bunch of utility and sample code that Apple ships for CoreAudio is C++, but you don't need to use C++ in CoreAudio if you don't want to. Even with AudioUnits, the API is actually C built on the ComponentManager. The C++ is just a set of wrapper classes that implement the correct semantics for the API. But one could just as easily write an ObjC version of the wrapper classes to implement an AudioUnit.
Just to add to this even more: I don't see much evidence that this
matters to Apple, but its reasonably clear at this point in time that
if you want to write an API that can be wrapped in a variety of other
languages, C is what you start with. The open source world is full of
examples of this: APIs that are defined and (mostly) implemented in C,
and then wrapped in C++, Python, Java, Ruby, Perl, C#, Haskell and
more. Starting with an API in ObjC or even C++ makes this task much,
much harder, so if that sort of thing matters, or might matter in the
future, the way that Apple did this is the right path.
_______________________________________________
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