Re: Setting Sample Rates
Re: Setting Sample Rates
- Subject: Re: Setting Sample Rates
- From: Bill Stewart <email@hidden>
- Date: Tue, 15 Jan 2002 16:05:42 -0800
on 15/1/02 12:16 PM, Jim Dolan wrote:
>
Hi Jeff -
>
>
I understand that streams only go in one direction and that I get all the
>
data for all of the streams during each IOProc. Let me re-phrase my
>
question using just an input device example.
>
>
Suppose that we have an input device with 2 streams, each with two channels.
>
Lets say that the driver configuration says that stream1 is two channels of
>
analog input and stream2 is 2 channels of digital input. My application is
>
not supposed to look like a mixer. I want to supply a mutually exclusive
>
list of input sources and provide the number of input channels accordingly.
>
In this case, I do not want to display 4 input channels to the user because
>
they are not the same type of input. If the user selects analog input, then
>
I want to display chan 1 & 2 as inputs. If they select digital input, I
>
still want the display channels 1 & 2, but do the mapping to the proper
>
stream behind the scenes. Depending on the selection, I would like to take
>
samples from one stream and ignore samples passed in the other.
>
In this case then you're not really treating this as a device with 4
channels, but as a device with 2 sets of mutually exclusive streams. In some
ways you could argue that this isn't a good representation of the device.
In any case, this is an abstraction that you're choosing to place on top of
the hardware... Why would it be a bad thing to present 4 channels to the
user. The fact that it has been published as a single device implies that
there is some very tight relationship between the different channels as
essentially they should be clocked off the same clock.
>
If however the two streams listed above, actually represented 4 channels of
>
analog line input, I would want to display 4 channels to my user, and I
>
would want to take samples from both streams during IO. If you follow me so
>
far, then the question becomes this. How do I tell if the streams are
>
configured one way or the other.
I don't know that I see this as a valid distinction if the only difference
is that one of the streams is analog and one digital. The fact that it is
the same device should mean that the samples will be locked together...
I also don't think there is any gospel that can be applied here. Some
hardware that we've seen will:
(1) Allow ONLY analog or digital not both
(2) Do both analog and digital versions of the same stream
(3) Allow seperation of data between analog and digital streams
So it is really hard to give you a hard and fast rule here.
We've definitely look at some tagging of the streams and channels - but as
Jeff said in his mail, this will be supported "later", so you'd still have
to deal with the current situation. If you're developing a driver for
hardware that will ship soon, we could possibly work something out with you
that will work with these tags before the OS actually ships with the
support, but will then work when it does...
Feel free to contact Jeff and I off the list to talk about this if you want
Bill
>
I suppose that if the data sources are implimented, I could cross-check the
>
channel with the source, but if data sources are not implimented - is there
>
still a way...
>
>
Thanks Jimmy D.
>
>
-----Original Message-----
>
From: Jeff Moore [mailto:email@hidden]
>
Sent: Tuesday, January 15, 2002 2:34 PM
>
To: CoreAudio API
>
Subject: Re: Setting Sample Rates
>
>
>
on 1/15/02 10:24 AM, Jim Dolan <email@hidden> wrote:
>
>
> Ok - So how do I know which channels from which streams to actually record
>
or
>
> playback to. If for example streams were divided up based on input type -
>
I
>
> would only want to take samples from one of the streams ie: the one I am
>
> inputting from. Likewise, I may only want to output to a particular
>
> connection. Since I have no way of associating the stream to an input or
>
> output what should I do? I was thinking of creating some UI that allowed
>
the
>
> user to map the streams with inputs/output's and set the number of busses
>
for
>
> each. This is a lot of work, and can be avoided if I could get the
>
information
>
> from the streams or the device
>
>
I really can't visualize what you are talking about here. Streams only go in
>
one direction, either in our out. I also have no clue what you mean by
>
"busses for each".
>
>
Fundamentally, the information for the routing of the data to a specific
>
jack isn't currently being supplied. This means you are on your own for the
>
time being.
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"We'll talk about it later...."
"When?"
"In a future life when we're both cats"
__________________________________________________________________________