Re: Buffer Size in Audio Units
Re: Buffer Size in Audio Units
- Subject: Re: Buffer Size in Audio Units
- From: William Stewart <email@hidden>
- Date: Mon, 26 Nov 2007 14:36:49 -0800
On Nov 26, 2007, at 4:28 AM, Adam Stark wrote:
Hi,
I have developed an audio unit that at some point in it's processing
uses an FFT. This FFT depends on the incoming buffer size of the
audio unit. I need to initialise the FFT routine before it is used
so that is is using the correct size (e.g. 128, 256, or 512, etc). I
know that during the process method I get the variable
inFramesToProcess which tells me the buffer size but is there any
other way to find out this information outside of the process method?
No. Your AU is told (or has a default) called Max Frames per slice -
this is the maximum number of sample frames your AU can be asked to
render at any time. So, you have to intitialise your AU to deal with
at most this many samples (and it could be less).
Typically, you deal with this by introducing some kind of processing
delay (latency) to deal with your FFT buffer processing size. You
report that latency, and you return silence the first latency samples
after your AU is initialised or Reset (to account for the internal
buffering you will have to do)
Bill
I want to initialise my FFT routine in the constructor with the
initial buffer size and then if there is a change in buffer size
then I want to re-initialise it. So I guess my exact questions are:
- How can I access the buffer size outside of the process method?
- Where should I place code to re-initialise the FFT routine? In the
Reset() method?
I'd be very appreciative of any help,
Thanks,
Adam
_______________________________________________
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