Re: Setting the volumes for a headphone data source
Re: Setting the volumes for a headphone data source
- Subject: Re: Setting the volumes for a headphone data source
- From: Jeff Moore <email@hidden>
- Date: Tue, 12 Mar 2013 18:41:50 -0700
On Mar 12, 2013, at 6:15 PM, Tim Hewett <email@hidden> wrote:
> Is there a way to set the volumes for a headphone data source (and even discover that such a data source exists programmatically) for the headphone port on a Mac's built-in audio device, when the headphones are not connected?
No.
> I have a MacBook Pro (early 2011) which only lists one source at a time, be it speaker, headphones or "digital out". When the headphones are connected, the single data source changes and the previous headphone volume settings are recalled and applied separately to the settings for the other data sources. My app sets the volumes to 1.0 (maximum) but if the user disconnects the headphones it needs to restore the settings to what they were previously so that they will be reapplied next time the 'phones are used.
>
> I can't find an API to do this. Any help would be much appreciated.
Generally speaking, we don't recommend that apps muck with the hardware settings. The settings belong to the user. The app should respect them. Often the user has a good reason for setting things the way they have them. Personal comfort being high on the list.
But if your app must change the volume for some reason, then you should be offering the user a UI affordance to give that control to the user. Such UI would then give your app a place to communicate to the user when the volume changes for whatever reason be it unplugging headphones or the user hitting the volume keys on the keyboard.
--
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