Re: Basic AudioQueue Service issue
Re: Basic AudioQueue Service issue
- Subject: Re: Basic AudioQueue Service issue
- From: William Stewart <email@hidden>
- Date: Thu, 23 Oct 2008 19:46:21 -0700
On Oct 23, 2008, at 8:32 AM, Hamish Allan wrote:
On Thu, Oct 23, 2008 at 3:39 PM, Craig Patchett <email@hidden>
wrote:
What I can't figure out how to work around,
however, is the popping sound I get when I restart a sound in the
middle of
playing.
The documentation for AudioQueueReset() states:
"If you queue buffers after calling this function, processing does not
begin until the decoder and DSP state of the audio queue are reset.
This might create an audible discontinuity (or "glitch")."
umm - this doesn't make sense to me
this is an internal detail of the audio queue's implementation. If you
reset and have enqueued buffers after the reset, then you may not hear
any "latency" in the following buffers - it all depends on how much
data the queue has in its buffer before it has to play it.
The real question (and I'm sorry, but I don't have the time to deal
with long multi-faceted questions - you are going to have to keep your
questions succinct and to the point) is why are you doing the reset?
The main point of doing a reset is that you want to stop the queue
from processing data and playing it where you have already enqueued
that data. Think of dragging a slider from one time to another. The
fact that there maybe some latency as a result of the reset is not an
entirely unexpected or even disruptive user experience (skipping
forward is an example)
One other point I will reiterate. You have total control of what the
queue plays - there is no magic to this - but its easy to lose sight
of this in the examples where they are playing sequentially through a
file.
I guess if you want lower latency than the time it takes for the DSP
state to be reset, you're out of luck.
Have you tried setting the queue volume to 0, then using
AudioQueueEnqueueBufferWithParameters() to set it back? The docs say
"Changes to audio queue buffer parameters take effect when the buffer
starts playing" so it might just work.
I'm about to start writing a seekable file audio player (having
previously only handled streaming) so I'll let you know how I get on.
Best wishes,
Hamish
_______________________________________________
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