Re: AudioQueue: How to change start time?
Re: AudioQueue: How to change start time?
- Subject: Re: AudioQueue: How to change start time?
- From: William Stewart <email@hidden>
- Date: Wed, 20 Feb 2008 19:03:03 -0800
For the stop - you can just re queue the buffers - we don't touch the
contents of the buffers.
Could you write a bug - I think we should think about this situation
some more :)
Thanks
Bill
On Feb 20, 2008, at 9:20 AM, Jens Alfke wrote:
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
_______________________________________________
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