This time I'm almost certain this is a bug in your code. ;-)
In AppleUSBComposite::ConfigureDevice(), if the device has multiple
configurations, and both configurations specify 0 as their MaxPower, then
the device will be left unconfigured by AppleUSBComposite.
This is because in the case of multiple configs, cd is inited to NULL, and
maxPower is inited to 0. This means that cdTemp->MaxPower > maxPower is
always false and cd is left NULL, failing out of the ConfigureDevice() call.
There are a number of different solutions to this, but M-Audio would prefer
that any solution always picks the first config if two configs have the same
amount of power (which rules out the simple cdTemp->MaxPower >= maxPower
change, unless you run the loop backwards).
Personally, I think that initing maxPower to -1 (and changing it to a
SInt16) would be a decent solution.
Do you agree?
Regards,
Mark
--
Mark Cookson
M-Audio, a part of Avid
225 Locust St.
Hudson, WI 54016
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden