Re: Problem getting Audio Queues to play simultaneously
Re: Problem getting Audio Queues to play simultaneously
- Subject: Re: Problem getting Audio Queues to play simultaneously
- From: Jens Alfke <email@hidden>
- Date: Tue, 17 Mar 2009 14:19:01 -0700
On Mar 17, 2009, at 11:49 AM, Ken Bowlus wrote:
I'm having problems trying to play two sounds simultaneously on the
iPhone. Dev Center documentation says to "create one audio queue
object for each sound" and "specify simultaneous start times for the
first audio buffer in each audio queue, using the
AudioQueueEnqueueBufferWithParameters function."
I've had similar problems — after a lot of experimentation and cursing
last year, I gave up on precise scheduling of start times, and instead
am using an NSTimer to trigger the call to AudioQueuePlay.
In general, something seems to be really screwy with the timing stuff
in AudioQueues. My attempts to get a sane result from
AUdioQUeueGetCurrentTime were equally frustrating — I have some code
now that kind of works, but not always, and the comments in the code
are rather R-rated.
[Disclaimer: I haven't run this code recently so I don't know if
10.5.6 fixed any of these issues. But from your question, I'm guessing
it didn't.]
Sorry this isn't very helpful. Apple dudes — it would be great to see
some sample code that demonstrates how to schedule the start time of
playback.
—Jens _______________________________________________
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