Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting num of output channels for a device



There are a few different ways to do it, but the simplest is to use the property kAudioDevicePropertyStreamConfiguration. This property returns an AudioBufferList that is populated like what you'd see in your IOProc. You can iterate through the AudioBuffers and sum the mNumberChannels fields to get the total number of channels.

There is code for doing this in the CAAudioHardwareDevice class in the PublicUtility section of our SDK. Also, you can see an example of it's usage in the HALLab app which is also in our SDK.

On Jun 15, 2006, at 12:15 PM, Christoph Teschner wrote:

I populate a list of audio output devices currently attached to the computer.
I would like to display the number of channels each device support.
How can I retrieve that information when I have the audio device ID of the device ?


--

Jeff Moore
Core Audio
Apple


_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden
References: 
 >getting num of output channels for a device (From: "Christoph Teschner" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.