Re: kConverterPrimeMethod_None not working on Tiger
Re: kConverterPrimeMethod_None not working on Tiger
- Subject: Re: kConverterPrimeMethod_None not working on Tiger
- From: Brian Willoughby <email@hidden>
- Date: Mon, 24 Mar 2008 16:45:14 -0700
On Mar 24, 2008, at 12:56, William Stewart wrote:
On Mar 22, 2008, at 2:35 AM, Brian Willoughby wrote:
I'm writing an AudioUnit which requires oversampling. I decided
to ditch the upsampling and downsampling code that I have in my
arsenal in exchange for the more flexible AudioConverter -
especially after seeing the quality comparisons. I obviously need
to set kAudioConverterPrimeMethod to kConverterPrimeMethod_None
because an AudioUnit cannot seek back in time, nor can it fetch
future samples. An AU must process the samples in the current
buffer, and none before or after (* see below). The documentation
seems to promise that AudioConverter will not ask me to pre-seek.
However, when I set up a stereo 4x oversampling conversion, with
an AU buffer of 512 frames, and I ask for 2048 output frames, my
AudioConverterComplexInputDataProc is given a request for 516
frames. In fact, it often is asked for 4 extra frames when
testing with auval. This would only make sense if I were using
the Pre-seek or Normal priming methods, but I am not.
No - its actually due to some rounding in the converter so that the
pull sizes are in 4 sample increments to facilitate better altivec/
SSE processing alignements.
You can use AUConverter directly to this work for you - just open
the AUConverter unit and then set the render quality and audio unit
property sample rate converter complexity property and you are good
to go
Bill
Thanks for the reply, Bill.
I'm not quite sure that I understand why I am having a problem using
AudioConverter directly, without having it wrapped in an
AUConverter. Specifically, 2048 and 512 are both nice multiples of
4. Seems like 512 would be a better choice than 516. In other
words, I understand the need for processing 4 samples at a time, and
I understand the general need for priming, but not when I so nicely
asked the AudioConverter not to do this.
I'd like to figure out how to use AudioConverter as advertised.
Brian
_______________________________________________
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