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: Michael Thornburgh <email@hidden>
- Date: Thu, 19 Sep 2002 18:02:31 -0700
hi jeff. thanks for your reply.
there must've been a great game of "telephone" going between your
response and what eventually made it back to me. the response
i got was something about "master channels and regular channels
mean different stuff, so what you're seeing is correct and you
just don't get it." there was no mention of the issue between
the HAL and the IOAudio family.
i see now that to get the current source you must use the
master channel of the device. that makes more sense in the context
of the reply i actually got to the bug report, and, i suppose, makes
sense with respect to the actual device.
i can imagine there being devices with per-channel or per-stream
independent source selectors. is that supported/possible with
the HAL and the IOAudio family, or is it only possible to have
one source per direction per device (on the device master channel)?
either way, it sounds like i have some changes to make to the
whole source handling part of MTCoreAudio. :)
-mike
On Thursday, September 19, 2002, at 04:51 PM, Jeff Moore wrote:
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.
_______________________________________________
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.