Re: how to tell if you can change a data source under program control
Re: how to tell if you can change a data source under program control
- Subject: Re: how to tell if you can change a data source under program control
- From: Jeff Moore <email@hidden>
- Date: Thu, 19 Sep 2002 16:51:22 -0700
I referred in my response to 3045565 to a problem between the HAL and
the IOAudio family with regards to read-only vs read/write controls
(the Radar Number escapes me at the moment). There currently isn't a
way to tell the difference, so the HAL has to assume that they are all
read/write and reports it that way.
It turns out that for the built-in hardware, the output data source
control is indeed read only. I don't believe that this is something
that can be changed in software like the input data source control can.
But, until we address the lack of communication between the family and
the HAL about the situation, we can't fix the bug even if it could be
changed in software.
On Thursday, September 19, 2002, at 03:17 PM, Michael Thornburgh wrote:
so, as of jaguar, AppleOnboardAudio devices, such as the ones in
my powermac, lombard powerbook, and imac, now report the presence
of the various output sources, such as the headphones, internal
speaker, external speakers (the apple pro speakers jack), etc.
and the HAL will generate notifications when that changes, like by
plugging in headphones to the headphones jack, or detaching
the pro speakers from the speaker jack.
that's neat!
however, you can't set the output source to the headphones jack
under program control -- the only way to do that is to plug in
headphones.
from a UI perspective, it's dorky to present a choose-the-source
widget that won't do what it looks like it should (see AudioMonitor.app
from MTCoreAudio, running on a jaguar system with
multiple-output-source
AppleOnboardAudio hardware. pretty dorky.).
it feels like you ought to be able to use the "isWritable" flag in
Audio{Stream,Device}GetPropertyInfo() for the
kAudioDevicePropertyDataSource
property to see whether or not trying to set that property would do
anything. however, depending on how you ask, you get one of two
wrong answers:
1) asking with AudioDeviceGetPropertyInfo() for the master channel
(0)
seems to just return "YES", even when it can't be set (like,
the "have to plug in the headphones" case).
2) asking for any channel that's not 0, or with
AudioStreamGetPropertyInfo(),
the return value (theStatus) of the function is 'who?',
indicating
that the property wasn't recognized.
both of these seem wrong to me, so i submitted a bug report (#3045565),
but got back "behaves correctly." i tried following up to no avail.
so... how can you tell whether the data source can be usefully set?
-mike
_______________________________________________
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.
--
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.