Playing multiple .caf files simultaneously - one queue?
Playing multiple .caf files simultaneously - one queue?
- Subject: Playing multiple .caf files simultaneously - one queue?
- From: Trygve Inda <email@hidden>
- Date: Mon, 22 Sep 2008 12:41:00 +0000
- Thread-topic: Playing multiple .caf files simultaneously - one queue?
I need to play several .caf (IMA4) audio files simultaneously with very
specific timing. E.g.:
FileA is 1 minute long and stars at time 0
FileB is 1 minute long and starts exactly when FileA ends
FileC is 10 seconds long and starts 55 seconds after FileA (it overlaps A&B)
To now, I have been doing this in QuickTime but need to adapt it to
CoreAudio so it can work on the iPhone.
Should I be doing this with a single queue and using
AudioQueueEnqueueBufferWithParameters?
If I use multiple queues, how to I keep timing synchronized?
The ref says:
Buffers play in the order they are enqueued (first in, first out). If
multiple buffers are queued, the start times must be in ascending order or
NULL; otherwise, an error occurs. This parameter specifies when audio data
is to start playing, ignoring any trim frames specified in the
inTrimFramesAtStart parameter.
So if FileC has to start in the middle of a buffer with FileA data, what
happens? Likewise, how do I start playing two files simultaneously?
Any sample code is greatly appreciated.
This should be common enough to CA to be neutral, but it does need to work
on the iPhone.
Thanks,
Trygve
_______________________________________________
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