The dilemma is, even in 2007, I am just getting started with parts
of Carbon that Apple considers obsolete. Do I drop what I am doing
and use Core Audio? I don't know. We have years invested in the
Carbon sound manager, so switching is nontrivial. The task is
almost as big as porting to, say, windoze. And this is perhaps 5 or
10% of our engine.
Just use CoreAudio. When you say that this is up to 10% of your
engine, are we to understand that your engine is small? I fail to see
how moving a single subsystem to a newer api is as big a task as
porting to Windows. Granted, when I did a port in the other direction,
sound was very tricky, but that was my own fault for ignoring what the
Apple engineers on the CoreAudio list were telling me.
You open the default output unit, set the render callback, set your
stream format and render quality, initialize the audio unit then start
it. In the render function, you supply your data--I assume that you
have other code that you can call to get the next n frames of data.
About the only tricky thing is that if you want to ensure that the
render callback is never called after you call AudioOutputUnitStop(),
you have to do that from the thread on which the render callback is
called. But even that is easy, just check a flag.
I don't know how many people are in this same boat, but maybe it's
time to start an open source project, say OpenCarbon or OpenCharcoal
or something so we don't get sued. Basically it would be Carbon
wrappers over Cocoa, basically like what happened with Quesa, where
they made a Quickdraw 3D wrapper over OpenGL:
[snip]
Now I suppose this might seem like a bit of a waste of time, but the
truth is, my partner and I have to do this anyway.
Yes, it does, and I doubt that you _have_ to do this. Plus, I fail to
see what CoreAudio has to do with Cocoa. Last time I checked, there
was no convenient way to do full-featured audio from Cocoa, maybe that
changed with 10.5.
[snip rant]
Well, lemme know what you think :)
I think your time would be better spent just updating the 10% of your
code.
--
Steve Checkoway
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-games-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden