Re: Curious happening with CAPlayThough
Re: Curious happening with CAPlayThough
- Subject: Re: Curious happening with CAPlayThough
- From: "Stephan M. Bernsee" <email@hidden>
- Date: Fri, 9 Jan 2009 07:12:00 +0100
Hi Jeff,
we would gladly use the AudioReflectorDriver instead of Soundflower,
but that one has another curious problem with CAPlayThrough: after
about 5 minutes of playthrough operation it starts glitching like hell
(problem #1 in my last message - but worse than Soundflower and more
frequently). At first I thought that had something to do with the
input and output sample rates not matching up (and they are in fact
slightly different and fluctuating), but that's what CAPlayThrough's
AUVarispeed unit is supposed to be there for, right?
Btw. it looks like the AUVarispeed's rate is set with numerator and
denominator reversed (line 642 in CAPlayThrough.cpp). But even after
correcting this it still doesn't work... I'd appreciate any help that
you can give us to solve these problems!
Thanks!
Stephan
2009/1/9 Jeff Moore <email@hidden>:
> That's interesting information. When I have seen drivers have a run
on
> problem, it was usually caused by the driver not doing enough
management of
> the erase head. Because the IOAudio family will continue to play
for a full
> ring buffer's worth of time after being told to stop, any erase head
> problems will manifest kind of like this. It happens like this
especially
> with short sounds as the quick start/stop sequence can exacerbate any
> existing problems.
>
> The primary means to control the erase head is the IOAudioEngine
method,
> getCurrentSampleFrame(). This method is supposed to return where in
the ring
> buffer the driver is currently, but it doesn't have to be an exact or
> perfect figure (although it should be reasonably close). In fact in
the
> AudioReflectorDriver, this method just returns the current position
with a
> granularity of 512 sample frames. This allows the erase head to
keep up, but
> not overwhelm the driver.
>
> At any rate, one theory I have is that SoundFlower is keeping the
erase head
> running very far behind it's current position. So if you have a
sound that
> starts and stops quickly, then perhaps the erase head is never
getting a
> chance to run. So when IOAudio runs through the buffer the last
time, the
> old data hasn't been erased yet and you hear it again. Just a
theory, but it
> might provide some guidance on where to look in the SoundFlower
code to fix
> the problem.
>
> BTW, if you have already found it, the AudioReflectorDriver code is
in our
> SDK in the directory, /Developer/Examples/CoreAudio/HAL
>
>
_______________________________________________
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