Re: Help with AUHAL & AudioConverter
Re: Help with AUHAL & AudioConverter
- Subject: Re: Help with AUHAL & AudioConverter
- From: William Stewart <email@hidden>
- Date: Tue, 7 Feb 2006 18:04:30 -0800
Stephen
What format do you need?
If your sample rate is the same (but you want say an interleaved or
int format), then you can actually have the AU do the format
conversion for you.
If the sample rate is different, then you will need to do the
conversion externally to the AU's render call.
The question though, is really too general to answer.
What are you doing with the audio input? If you are writing a file,
then you can use the ExtAF API and just give it the format that you
have - it will do all necessary conversions for you.
If you want the audio in some format in order to do some post-
processing or other activities with, then you need a more complex
solution - probably you will need to buffer the audio input you have
from the device (there are some AudioBuffer Ring Buffer code in
PubicUtility)... Then you run some other thread and use whatever
services you need to convert that audio to the format you want. The
AUHAL does NOT buffer audio, so you really can't call its render call
from an AudioConvFill's InputProc directly - at least there would
need to be a lot of gymnastics about getting the notifications and
time stamps right, etc...
Bill
On 07/02/2006, at 4:51 PM, Stephen Shaw wrote:
Using the ComplexPlayThru as an example, I’m able to get a AUHAL
set up which supplies me with audio input. I’m still trying to
discern the best way of taking this input and converting it to the
format I need. It looks like there’s two options:
In the AUHAL input callback I can call the AudioUnitRender to
acquire the data and then call AudioConverterFillComplexBuffer to
convert it, or I could call AudioUnitRender from the AudioConveter
callback routine and return the acquired data to the converter from
there. One problem I see with the second option is I loose access
to the TimeStamp parameter in order to call AudioUnitRender.
I would really appreciate any help, tips or pointers anyone can
provide me since I’ve got a feature deadline pressing.
Stephen
Macintosh Virtual PC Engineer
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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