Re: clarification on RME suggestions ...
Re: clarification on RME suggestions ...
- Subject: Re: clarification on RME suggestions ...
- From: Jeff Moore <email@hidden>
- Date: Fri, 21 Jun 2002 14:09:50 -0700
On Friday, June 21, 2002, at 01:29 PM, John Lazzaro wrote:
I just need to confirm what that algorithm is -- that's why I
posted my best guess of what would work in the general case, in
order to get comments like "no, don't do X, do Y, you're assuming
something that isn't always going to be true" from folks who have
more experience than I do in the OS X world.
I would not necessarily assume that if the first stream of a
multi-stream device has only one channel that all the other streams
also only have one channel. While in general, this will be true, the
HAL doesn't guarantee it. The device is free to mix and match it's
stream formats in whatever way is most efficient for it. For instance,
it would be legal (but a little odd) for the first stream on a device
to have 1 channel, the second to have 3, and the third to have 143.
Apps should use kAudioDevicePropertyStreamConfiguration to get a
picture of the channel layout of a device. This property returns an
AudioBufferList that has the same structure as the one you will see in
your IOProc except the actual pointers to the buffers will be NULL
since this is for informational purposes.
Alternately, you could iterate over all the streams in a device and ask
each one for it's current format and glean the same information that
way. You would use kAudioDevicePropertyStreams with
AudioDeviceGetProeprty() and then kAudioDevicePropertyStreamFormat with
AudioStreamGetProperty(). This is probably a bit more code, but totally
equivalent.
Does this make it any clearer?
--
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.