• 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: getting num of output channels for a device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting num of output channels for a device


  • Subject: Re: getting num of output channels for a device
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 15 Jun 2006 12:28:45 -0700

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

  • Prev by Date: Re: 5.1 AC-3 WAVs recognized as 2 channels?
  • Next by Date: Re: 5.1 AC-3 WAVs recognized as 2 channels?
  • Previous by thread: getting num of output channels for a device
  • Next by thread: AUListenerAddParameter
  • Index(es):
    • Date
    • Thread