Re: Speaker Audio when Headphone connected?
Re: Speaker Audio when Headphone connected?
- Subject: Re: Speaker Audio when Headphone connected?
- From: Jeff Moore <email@hidden>
- Date: Mon, 25 Feb 2008 15:55:04 -0800
On Feb 25, 2008, at 3:36 PM, Brian Willoughby wrote:
What about the source/destination property for the output? In Audio
MIDI Setup, this appears as a popup button labeled "Source" under
the Audio Output. On my Power Mac, this lists "Internal speakers"
and "Digital Out".
In other words, if Apple were to (theoretically) make it possible
for software to enable the built-in speakers, even overriding
anything plugged into the headphone jack, wouldn't the proper
CoreAudio API access to this be through some property of the output
stream?
Indeed. Regardless of whether the capability exists in the current
batch of hardware or no, you'd be using the HAL's data source controls
to change this kind of setting.
Certain Apple computers may physically be capable of this routing,
but third-party programmers only have access to what is supported.
It would seem that there is already a supported API for handling
this situation. Whether or not it is implemented in the current
release is another question.
It may also be something you want to adjust on non-built-in devices too.
I went looking for the code, and I see: kAudioJackControlClassID, a
boolean which seems to only indicate whether something is plugged in
or not; kAudioDataSourceControlClassID and
kAudioDataDestinationControlClassID, which might be appropriate,
even though it seems Audio MIDI Setup should label the Audio Output
"Destination", not "Source"; and then there are many options for
settings the PlayThroughDestination, which are not appropriate. The
Audio Data Source/Destination Control Class ID properties have
associated properties which list the available options, and could be
used to populate the popup button.
The control you want is the (slightly mis-named) output data source
selector control, also embodied by the kAudioDevicePropertyDataSource
family of properties. This selects among a set of mutually exclusive
values that control where the data is going.
FWIW, the name for this control and it's family of properties stem
from the input side and the desire to have the same property/control
for both input and output. So we named it "data source" with the focus
on input and held our nose when talking about the data source property
for the output side of things.
--
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