AudioQueue: How to change start time?
AudioQueue: How to change start time?
- Subject: AudioQueue: How to change start time?
- From: Jens Alfke <email@hidden>
- Date: Wed, 20 Feb 2008 09:20:49 -0800
I'm calling AudioQueuePlay( ) with a timestamp parameter, to schedule
playback at a specific future time. However, in some cases I need to
change that time before playback begins, in response to user actions.
If I just call AudioQueuePlay again, with a different timestamp, it
has no effect. Calling AudioQueuePause first doesn't help. The only
way I've found to make this work is to call AudioQueueStop before
AudioQueuePlay. Unfortunately, this has the side effect of resetting
the queue and discarding buffers — and since the audio data is coming
from an incoming network stream, that's bad.
Is there any way of accomplishing this? Right now I think I need to do
one of the following:
(1) Don't call AudioQueuePlay until a second or so before the playback
time. (I still want to use the timestamp, to get sample-accurate
timing, but this way there'd be a much smaller time window where I can
no longer alter the time.)
(2) Somehow save the queue's buffers before calling AudioQueueStop,
and then put them back again afterwards. I'm not sure how to do this.
Any advice or other workarounds?
—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