• 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: Enable system volume when driver doesn't
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable system volume when driver doesn't


  • Subject: Re: Enable system volume when driver doesn't
  • From: "Mikael Hakman" <email@hidden>
  • Date: Mon, 10 Mar 2008 22:58:50 +0100
  • Organization: Datakonsulten AB

On March 10, 2008 10:11 PM, Jeff Moore wrote:



On Mar 10, 2008, at 8:54 AM, Mikael Hakman wrote:

I need to control volume level when using standard system media applications and (external) audio interfaces that don't enable OS X master system volume control. I need to enable system volume so that the user could use Apple IR remote to control it. I don't know what is available and/or possible to accomplish so I would like you to comment on conceivable approaches.

There is no direct way to do this.

One way to do it would be a kind of virtual audio device driver.

There are a few hack-ish ways to do it, of which this is one.


Many thanks Jeff for taking the time to answer. What would be the other hack-ish ways to do it?


Such a driver would take name of real audio interface as a parameter. The driver would be chosen as default audio output by the user. It would present itself to the operating system in such a way that the system volume would be enabled. It would intercept the outgoing audio stream(s), rescale the volume, and pass modified stream(s) to the real device driver.

I don't know whether it is possible to implement such driver at all and what technology (API) would you use. If it is then perhaps there is such driver already available? If it isn't available then I would appreciate pointers to relevant API and example documents.

You'd be dealing with the HAL's user-land driver API. The sample code for such a driver is in /Developer/Examples/CoreAudio/HAL/ SampleHardwarePlugIn.


That said, what you propose is easier said than done. There are a lot of behaviors and semantics you'd have to implement to make this as transparent as you would like. Basically, you have to implement a repeater for all the properties and what not. The sample code won't really help you with this, but will show you the basics of writing such a driver.


Yes, I understand this, which is the reason I was hoping that someone did already such a driver, commercial or not. I only need to control the volume. I hope the other properties could be controlled in MIDI control panel on the real driver. Would this make the amount of work less?


The best solution would of course be a virtual system volume control implemented in the OS, to be used at user's or programmer's discretion when dealing with interfaces not exposing this to OS. But this may be to hope for too much. I understand that doing volume control in digital domain is not always advisable (you loose some dynamic range and add some quantization distortion). In our environment, because of remote control requirement, the only alternative is to put an analogue remote controlled preamp in otherwise pure, all the way to digital studio monitors, digital path. This in turn means first a D/A conversion and then A/D again, both of which aren't needed otherwise. So I figure out that using 24 bits audio, there would be a plenty headroom to attenuate from and the results using digital volume control would be better than the 2 unnecessary conversions.

I'll look at /Developer/Examples/CoreAudio/HAL/SampleHardwarePlugIn anyway, thanks for the link.

TIA

_______________________________________________
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


  • Follow-Ups:
    • Re: Enable system volume when driver doesn't
      • From: Jeff Moore <email@hidden>
References: 
 >Enable system volume when driver doesn't (From: "Mikael Hakman" <email@hidden>)
 >Re: Enable system volume when driver doesn't (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: Enable system volume when driver doesn't
  • Next by Date: Re: Error in SDK FilterDemo example
  • Previous by thread: Re: Enable system volume when driver doesn't
  • Next by thread: Re: Enable system volume when driver doesn't
  • Index(es):
    • Date
    • Thread