• 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: How to correctly set input gain for a HAL device?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to correctly set input gain for a HAL device?


  • Subject: Re: How to correctly set input gain for a HAL device?
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 20 Dec 2005 11:43:41 -0800


On Dec 20, 2005, at 12:00 AM, Rustam Muginov wrote:

Hello all.
How to correctly set input gain for a HAL input device?
As far as I understand, i should first check if master-channel is available for input.
If device does have master-channel, then use it to set gain.
If device does not have master-channel, iterate thru all channel and set gain individually.


Is it correct?

It's a decent algorithm that will work for most bits of hardware. It is ambiguous when the device has both a master volume and an individual volume on the channel.


Should the same method be applied then setting output volume of HAL device?

It can be.

Could anyone provide "algorithm" or pseudo-code for this?

Not as such, but the basic building blocks can all be found in the HALLab sample code.



Yes, i know that I should use AUHAL functionality, but I need to support two version of interfaces for interfaces, both HAL and AUHAL for some time.

AUHAL is not necessarily going to help you here. It does reflect the various HAL properties of the device it's talking to through the AU's property accessors, but it doesn't really save you anything over dealing with the HAL directly when manipulating a device's controls.


All that said, most applications have no business touching hardware controls. There are exceptions of course, but by and large, it is best to let the user control hardware settings through the appropriate system UI like the Sound Prefs panel or Audio MIDI Setup.

--

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: 
 >How to correctly set input gain for a HAL device? (From: Rustam Muginov <email@hidden>)

  • Prev by Date: 3d mixer
  • Next by Date: Re: Synchronizing with the actual USB device audio clock
  • Previous by thread: How to correctly set input gain for a HAL device?
  • Next by thread: Synchronizing with the actual USB device audio clock
  • Index(es):
    • Date
    • Thread