• 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: Simple HAL device question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple HAL device question


  • Subject: Re: Simple HAL device question
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 29 Aug 2002 12:19:21 -0700

On Thursday, August 29, 2002, at 08:28 AM, Christopher Corbell wrote:

Or is there a simple way to just get an array or range of channels for a device?

The easiest way is to use kAudioDevicePropertyStreamConfiguration. The AudioBufferList it returns will be populated with the number of channels per stream in the direction you have requested. Just sum the channels in each AudioBuffer and you'll get the number of total channels in the given direction.

kAudioDevicePropertyStreamConfiguration will return an empty AudioBufferList (that is one with no AudioBuffers in it) if the device doesn't have any streams in the direction you requested (recall that devices may have input, output, or both sections).

Also be aware that you need to ask the device about the right section with the value you pass to isInput. The channel number doesn't matter for this property.

Calling GetDeviceProperty(kAudioDevicePropertyStreamConfiguration)
for the same set of devices returns without errors but one of the devices returns
an AudioBufferList with 0 channels. This happens regardless of the
is-input flag with this device. Is this normal?

This seems kind of weird. All devices should have at least one stream, be it an input our an output stream. What hardware are you working with?

--

Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Simple HAL device question
      • From: Christopher Corbell <email@hidden>
References: 
 >Simple HAL device question (From: Christopher Corbell <email@hidden>)

  • Prev by Date: Carbon Soundmaneger siInterrupt bug fixed in Jaguar
  • Next by Date: What happened to Audio Units?
  • Previous by thread: Simple HAL device question
  • Next by thread: Re: Simple HAL device question
  • Index(es):
    • Date
    • Thread