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: Heath Raftery <email@hidden>
- Date: Fri, 17 Jun 2005 08:27:15 +1000
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