Re: AUVarispeed usage question
Re: AUVarispeed usage question
- Subject: Re: AUVarispeed usage question
- From: William Stewart <email@hidden>
- Date: Tue, 22 Apr 2008 14:59:34 -0700
On Apr 22, 2008, at 11:45 AM, Kevin Dixon wrote:
I still haven't gotten a response from my previous post, so I'm
going to
rephrase my question.
If I'm using the AUVarispeed, and have playback rate != 1 or pitch
change
!= 0, then I should expect to get a different amount of samples out
than I
put in, correct?
yes, but this is the problem with using converter units (and not
offline units). Converter units you don't really know what the
difference is going to be to completely "convert" an input from a file
because parameters may change randomly which can have a direct affect
on how many samples on the output side you really need.
So, in the auprocess example (CAAUProcessor.h/cpp) has different input
callbacks to use for different types of audio units:
Effects
- you can work out the output size == input size + tail + latency
(where you have to trim latency samples from the start)
Offline
- just provide input and keep pulling until the output tells you it
is done
Converters
- no real way, so you keep track of the input, when you don't have
any more input you return an error as a signal to your output that you
don't have any more input to provide. Doesn't mean that you are
completely done though, and probably you need to flush silence through
as well.
The code in CAAUProcessor does all of this, so rather than just
looking at this for a few minutes, I'd really recommend that you have
a thorough understanding of it. It works for all of these kinds of
audio units, and provided those AUs are correct it will give you a
sample accurate result for effects and offline units, and as close as
you can get with converter units (in the general case)
Bill
So far I have been getting the same amount in and out. I was
wondering if
there's some property I should check to see what samples to actually
use,
or something of the sort. Thanks in advance,
-Kevin
_______________________________________________
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