• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Automatically initialising an AudioBufferList for input of data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Automatically initialising an AudioBufferList for input of data
      • From: William Stewart <email@hidden>
References: 
 >Re: Automatically initialising an AudioBufferList for input of data (From: Cynthia Bruyns <email@hidden>)

  • Prev by Date: Re: Acquiring input Data
  • Next by Date: Re: Multiple unexpected AudioConverterComplexInputDataProc invocations
  • Previous by thread: Re: Automatically initialising an AudioBufferList for input of data
  • Next by thread: Re: Automatically initialising an AudioBufferList for input of data
  • Index(es):
    • Date
    • Thread