views:

36

answers:

0

Hi,

There is an existing thread about this dating from may 09.

I need to be able to start the playback of several audioqueues with musically accurate timing, ie. as in a metronome.

This is for Mac OS 10.5 or greater, not iphone.

So far, I am creating the queues, priming the buffers using AudioQueueEnqueueBufferWithParameters. Then sending a notification to begin playback. I have been using mach_absolute_time to define an AudioTimeStamp as the base start time, and then calculating later timestamps for the desired start times. These are used to enqueue the buffers.

The thread from last year mentions that an audioqueue must always be running for this to work, but I'm not sure if this is accurate. The documentation makes it appear that the audioqueues should start at the times set by the audiotimestamps, but I am unable to get this to work. The queues play back simultaneously as though there was no timestamp in the EnqueueBuffer call.

Any suggestions would be appreciated.

thanks

r