Re: Trying to use an AUConverter with an input callback (Leopard 10.5.8)
Re: Trying to use an AUConverter with an input callback (Leopard 10.5.8)
- Subject: Re: Trying to use an AUConverter with an input callback (Leopard 10.5.8)
- From: John Sheehy <email@hidden>
- Date: Tue, 22 Sep 2009 16:38:11 -0700
Thanks a lot Doug, I'll just probably use the AudioConverter API in
that case from another thread.
On Sep 22, 2009, at 11:15 AM, Doug Wyatt wrote:
On Sep 21, 2009, at 17:00 , John Sheehy wrote:
Hi all,
I've managed to set up the default AUHAL output unit for input, and
can record @ whatever h/w sample rate is at without problems. What I
need however is to convert the incoming sample rate to 16Khz. Is
there any way I can do this transparently, as in connect the default
output unit's input bus to an AUConverter, setting the appropriate
stream formats on both sides of the converter ?
Ideally, I would have one callback, inside which I'd call
AudioUnitRender, and the audio it would render would have already
gone through the converter. Is this possible ?
I've tried various combinations of setting render callback with
various bus specifications on the input unit and the AUconverter
component, but to no avail.
The only examples I've been able to find all end up in an output
unit, but as outbound SRC seems to be transparent in Leopard, I
haven't needed to worry about that side of things.
I'd really appreciate it if someone could tell me this is definitely
possible, and even better point me in the direction of any sample
code or tutorial that achieves this..
There is no way to perform sample rate conversion on input with AUHAL.
Some alternatives:
- use an audio queue
- capture your input at the hardware sample rate to a ring buffer; on
another thread perform the rate conversion
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