• 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
Getting Total Channels of an Input Device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting Total Channels of an Input Device


  • Subject: Getting Total Channels of an Input Device
  • From: Craig Bakalian <email@hidden>
  • Date: Fri, 11 Mar 2005 05:03:31 -0500

Hi,
I still have Daisy's source on my hard drive. I have realized that the way to get the total channels of an input device is a bit more complex than I thought. Must I do the following to get the total channels?


UInt32 outsize;
Boolean writable;
AudioBufferList *bufferList;
UInt32 channelCount;

AudioDeviceGetPropertyInfo(inputDeviceID, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outsize, &writable);
bufferList = malloc(outsize);
AudioDeviceGetProperty(inputDeviceID, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outsize,bufferList);


for(i=0;i<bufferList->mNumberBuffers:i++)
{
	channelCount += bufferList->mBuffers[i].mNumberChannels;
}

Am I correct in assuming that if a device has a kAudioDevicePropertyStreamConfiguration with a bufferList count of 2, and each buffer has a channel count of 2 that there is 4 channels in the input device? And, another example could be a bufferList count of 2 where each buffer has 1 channel, does this mean the input device has 2 channels of audio data? Is that configuration possible? Are there any impossiblities?

I apologize for my ignorance, I am just trying to get a handle on the paradigm of BufferList, mBuffers[], mData Is it safe to say, a BufferList may contain many mBuffers, and a mBuffer may contain one mData. And the confusion for me is the state of mData. Is mData laid out according to the AudioStreamBasicDescription's mChannelsPerFrame, thereby mData may contain many channels of audioData.

Isn't this a bit obfuscated? Do audio engineers really need to go this far? Does audio recording really need this much complexity? Wouldn't the data coming into a IOProcess be a bit more intelligent if was a list of channels instead of a list of channels with channels? Or am I simply confused? Help, please someone open this conversation, reply, please reply!

Craig Bakalian

_______________________________________________
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


  • Prev by Date: Re: How to get raw audio values?
  • Next by Date: Reg: Core Audio Plug in
  • Previous by thread: Re: How to start with Audio driver for USB 2.0 device
  • Next by thread: Reg: Core Audio Plug in
  • Index(es):
    • Date
    • Thread