Re: Streaming audio to built-in audio device
Re: Streaming audio to built-in audio device
- Subject: Re: Streaming audio to built-in audio device
- From: David Duncan <email@hidden>
- Date: Sat, 5 May 2007 09:27:10 -0700
On May 5, 2007, at 12:58 AM, Bob Lang wrote:
If you want to convert Apple's pull model into a push model, then
you need to create a circular buffer between the two models. You
need to push your samples into the buffer to fill it up, while Core
Audio pulls out data from the buffer to empty it. I've done this
for a Java replacement mixer so I know it can be made to work.
And while this is a fine approach when it must be done, it should
also be noted that getting this right is not trivial, as your
circular buffer must be thread-safe without taking any locks in the
Core Audio thread. And unless you get this off the shelf, you still
have to setup everything Core Audio related in the first place, so if
a push model is not a requirement (that is, the API isn't set in
stone like with Java), you might as well just adapt your code to the
pull model instead.
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.
David Duncan
_______________________________________________
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