On Jan 30, 2005, at 11:59 PM, Lubor Prikryl wrote:
Hi,
Thanks to kindness of Bill and Doug from CA team I had learned a few things about USB Class compliant driver (CCD). Maybe it will help the others who might be surprised by its behavior.
I have some more questions I wish to have answered.
Facts:
- USB devices with CCDriver appear as two independent audio devices (2 IDs)
The HAL creates an AudioDevice for each IOAudioEngine attached to a given IOAudioDevice. The reason being that each IOAudioEngine represents an independent time line.
- They publish a contiguous interval of sample rates (e.g. anything from 32000 to 48000 Hz or even from 5990 to 50100 Hz)
- They publish physical Format with sample rate equal to zero.
The second statement is true only if the first statement is true. It is entirely possible and legal for a device to publish a discrete range or supported sample rates. In such case, the device will publish a physical format for each individual sample rate.
Questions:
- Is the uncertainty in SR a property of the driver or of the device? Of every device? I tested YAMAHA speakers and M-Audio FastTrack, both of them allow any frequency in certain range.
I don't understand the question. To what uncertainty are you referring?
- How to install notifications across input and output? If I change SR for the input of FireWire device, I obtain a notification for output, that the device had switched the output SR to the same value as I had set for input. Because of asynchronous behavior I am waiting for the message to handle SR change in my app. With USB CCD, I have two devices so the notification goes to another device than I need.
USB CCD does not change SR for both devices simultaneously, so I have to change for two devices at once. But how to find the proper pair, e.g. if I have more than one device of the same type? It requires a different approach (even different from Audio MIDI Setup) to change settings for input and output device always simultaneously, i.e. twice.
The way to find out which two AudioDevices make up the input and output side of a given USB Audio device is via kAudioDevicePropertyRelatedDevices. This property returns an array of AudioDeviceIDs for all the devices that share the same IOAudioDevice.