Re: "Channel" confusion
Re: "Channel" confusion
- Subject: Re: "Channel" confusion
- From: Scott Lehman <email@hidden>
- Date: Thu, 14 Jun 2001 16:21:19 -0700
- Organization: Harmony Central
>
> So what is a "device channel"?
>
>
A device channel is the absolute 1-based channel number on a device as
>
opposed to a stream channel which is the 1-based channel number within a
>
single stream.
>
>
For instance if you have a device whose stream layout is 4 streams with 2
>
channels each, the second channel of the third stream would have a device
>
channel number of 6 but a stream channel number of 2.
>
>
So what this means in terms of the HAL API is that you can address things
>
like volume and mute at the device level using device channel numbers in the
>
AudioDeviceXXXPropertyXXX routines.
So am I getting this correctly?
-The number of channels in a single stream is equal to the number of
AudioBuffers in the AudioBufferList passed to the IOProcs registered for
that stream
-As far as my app is concerned, the device channel maps to one and only
one of the audio buffers in the AudioBufferList passed to my IOProc.
-It's expected that for a single device (on either the input or output
side), no two streams will share the same stream format - rather, there
would be one stream of that format with multiple channels. (and maybe
this wouldn't hold for advanced cards with hardware that can switch formats?)
And for a final hypothetical example, so I have a PCI card with a single
ADAT output. By probing I might find a single stream with 8 channels,
and then by using the corresponding device channel numbers, I might be
able to get meaningful names like "ADAT Channel 1", "ADAT Channel 2",
etc. to then display to the user, allowing them to make a routing choice?
Sorry if I'm just an idiot here, but all the APIs I've worked with in
the past were much more straightforward. However I do think that I am
beginning to appreciate the power of CoreAudio that those other API's lacked.
Thanks,
Scott