Re: Resampling
Re: Resampling
- Subject: Re: Resampling
- From: Doug Wyatt <email@hidden>
- Date: Fri, 13 Mar 2009 14:51:29 -0700
On Mar 13, 2009, at 13:55 , Jens Alfke wrote:
On Mar 13, 2009, at 12:10 PM, email@hidden wrote:
So if I'm going to use AudioConverter, then will the AudioConverter
callback simply request the number of 16KHz frames it needs in
order to
satisfy each call to AudioConverterFillComplexBuffer (probably
alternating between 185 and 186 16KHz frames for 512 44.1KHz frames)?
Something like that. I wouldn't make any assumptions about how many
frames it asks for at a time, though, since it might ask for more if
it has internal buffering, or just needs to work on larger sample
sets for better interpolation, or whatever. Just be prepared to give
it as many as it asks for.
If you're connected to an audio unit, you have to give exactly what it
asks for.
If you're providing data to an AudioConverter callback, you can give
it however much you like, as long as you promise not to free or change
the contents of that memory until you're called again (the converter
holds pointers into these buffers until it's done with them, avoiding
copying in many cases). If you provide more than is necessary, the
converter will keep track of how much it consumed and start consuming
from the point next time. If you provide less than what is necessary,
the converter will call you again for more.
Doug
_______________________________________________
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