Re: audioqueue tiing w. audiotimestamps (again)
Re: audioqueue tiing w. audiotimestamps (again)
- Subject: Re: audioqueue tiing w. audiotimestamps (again)
- From: Robert Carroll <email@hidden>
- Date: Fri, 13 Aug 2010 07:40:26 -0400
HI,
Once again,thank you for this information. Playback now sync's up as expected after moving the audiotimestamp to the AudioQueueStart call.
As far as I can tell there is no mention of this in the documentation.
On Aug 12, 2010, at 10:53 AM, Jean-Daniel Dupas wrote: Le 12 août 2010 à 16:46, Robert Carroll a écrit : Hi,
I have posted about this issue a few times.
So far, attempting to control the playback start times of 3 or 4 audioqueues by setting independant audiotimestamps in the AudioQueueEnqueueBufferWithParameters
is not working.
I am using hosttime with the hosttime valid flags set in the sudiotimestamps. The times are derived form mach_absolute_time following some sample code originally from Doug Wyatt. The original code to get the host time has been re-written to be in Objective-C, but returns matching values to the sample code, so I don't think there is a problem with the times being set.
Is there a fundamental flaw in using this approach? ie. I set times at one second intervals in the time stamps, enqueue the buffers with those timestamps are parameters, then trigger playback by sending a notification to all three or four queues? As I understand the documentation, this should cause them to play in sequence starting 1 second apart, however they all just play loosely at once, the same playback I get if I pass NULL for the audiotimestamp in the enqueue buffer call, or when I was just calling AudioQueueEnqueueBuffer.
Any suggestions would be greatly appreciated.
AFAIK, AudioQueueEnqueueBufferWithParameters does not support host time, but only sample time relative to queue start time. If you want to sync many queue, you can use host time in AudioQueueStart() to define a precise start time. Then you can schedule buffer relative to this time. -- Jean-Daniel
|
_______________________________________________
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