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 19:11:05 -0700
On Thursday, September 19, 2002, at 06:13 PM, B.J. Buchalter wrote:
It appears that CoreAudio does not support this yet. It is something
that we
could actually use for our device(s) -- most of our channels have a
number
of sources or psuedo sources that currently can only be controlled by
our
console App. It would be cool to be able to export that control to CA
clients without having to resort to some set of private properties. So
I
second Mike's motion -- it would be good to have source selectors on a
per
channel (or at least per stream) basis.
until today i'd always thought that you could have independent
sources (and had assumed they were by-stream for some reason).
it had always been a sticking point for me how to organize and
represent the source/stream relationships.
if there were to someday be support for independent sources per-stream
or per-channel, there should be some way to detect the source
organization,
so that you can predict what will actually change when you set the
property. the most straight-forward way, using today's API, would be
something like:
device channels 1,2 are grouped together, can use built-in mic or
line in jack. channels 3,4 are grouped together, can use a second
built-in mic or a second line-in jack.
source IDs for channel 1 are: 1 (mic), 2 (line-in)
source IDs for channel 2 are: 1 (mic), 2 (line-in)
source IDs for channel 3 are: 3 (mic), 4 (line-in)
source IDs for channel 4 are: 3 (mic), 4 (line-in)
you therefore would know that if you change channel 1, channel 2 will
change too. although doing that correlation is a backwards way
to come to that conclusion.
this may not actually be the best way to deal with this. what you
really want to know is whether the source groups are by-device,
by-stream, or by-channel, so the structure of the device can be
accurately presented to the user.
there could be a new property for a "source-group-ID", for which
you would scan the master and regular channels of the device and
its streams to map it out, and get back an error code for inappropriate
choices (like you do today if you ask for not-the-master-channel-of-the-
device). for example, if the device/direction had no master source, and
no per-channel sources, but two streams and per-stream sources, you'd
get
back errors for everything except the stream master channels.
or perhaps a new property that returned such a map all at once in some
sort of nasty structure or CFComplicatedCompositeCollection.
obviously, for backward compatibility, getting or setting the source, or
getting the source list, on the device master channel should still do
something that's as correct as today's behavior.
-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.