Reputation: 43
The Audio Queue Documentation from Apple claims to have "Additional advanced features support scheduled playback and synchronization of multiple audio queues". However, no documentation for the same is found anywhere on the net.
I have three Audio Queues, that need synchronous playback/stop/pause/resume. Any pointers is appreciated.
Upvotes: 1
Views: 313
Reputation: 36169
There are many intriguing looking functions that use AudioTimeStamp
in the AudioQueue
header file.
In particular AudioQueueStart
has an AudioTimeStamp
parameter called inStartTime
.
Maybe you could use the mHostTime
field to specify the host machine's time base, mach_absolute_time
which you ought to be able to use to synchronise multiple audio queues.
Then I guess you'd use the inStartTime
argument in AudioQueueEnqueueBufferWithParameters
to queue your buffers at the right time. Not sure how you'd synchronise stop...
Personally, I've found AudioQueues
to generate more heartache than LPCM, so I'd mix and output the three audio streams myself using a remote io audio unit (or the modern equivalent) because you get synchronised play,resume/stop,pause for free.
Upvotes: 1