Re: Automatically initialising an AudioBufferList for input of data
Re: Automatically initialising an AudioBufferList for input of data
- Subject: Re: Automatically initialising an AudioBufferList for input of data
- From: William Stewart <email@hidden>
- Date: Thu, 16 Jun 2005 16:57:24 -0700
Well, personally, I like: AUOutputBL.h/.cpp in PublicUtility in the /
Developer/Examples/CoreAudio directory - this is a fairly simple
wrapper specifically targetted for AU usage.. For the full, mind-
bending experience, have a look at CABufferList.h/.cpp
Bill
On 16/06/2005, at 3:27 PM, Heath Raftery wrote:
No, I'm aware of asbd's. I have asbd's of my input, and I could
write a function which checks all the options of the asbd (channels
per frame, bits, interleaving, etc.) and the
kAudioDevicePropertyBufferFrameSize value, and creates a
AudioBufferList accordingly. But not only is that a lot of work, I
still have no idea whether I've got it right, or captured all the
variables. Therefore I'm looking for an automated way to create an
AudioBufferList, based on an AudioUnit, without having to consult
the asbd's properties and call all the GetProperty's to build it
myself. I could well be asking too much here - it was just a tease
to find AudioDevice appeared to have to right calls.
On 17/06/2005, at 5:13 AM, Cynthia Bruyns wrote:
Are you looking for is the AudioStreamBasicDescription?
file:///Developer/ADC Reference Library/documentation/
MusicAudio/Reference/CoreAudio/core_audio_types/
chapter_6_section_4.html
Message: 3
Date: Thu, 16 Jun 2005 23:11:42 +1000
From: Heath Raftery <email@hidden>
Subject: Automatically initialising an AudioBufferList for input of
data
I am currently setting up my fInputBufferList by hand, based on
trial
and error. That's not particularly robust given the various
fInputUnits I might be dealing with. The AudioDevice API has this,
which appears to deal with the problem:
<code>
AudioDeviceGetPropertyInfo(fInputDeviceID, 0, YES,
kAudioDevicePropertyStreamConfiguration, &theSize, NULL);
fInputBufferList = (AudioBufferList *)malloc(theSize);
AudioDeviceGetProperty(fInputDeviceID, 0, YES,
kAudioDevicePropertyStreamConfiguration, &theSize,
fInputBufferList);
</code>
But my fInputDeviceID properties are different to the output format
of the fAudioUnit (specifically the data is deinterleaved inside the
unit), so the fInputBufferList that comes back is fairly useless. I
couldn't see anything in AudioUnit that might do what I want.
_______________________________________________
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