Re: Getting an AudioDeviceID from device unique identifier (UID)
Re: Getting an AudioDeviceID from device unique identifier (UID)
- Subject: Re: Getting an AudioDeviceID from device unique identifier (UID)
- From: "B.J. Buchalter" <email@hidden>
- Date: Thu, 24 Apr 2003 13:02:45 -0400
on 4/23/03 3:40 PM, Jeff Moore at email@hidden wrote:
>
The right behavior here is still not to return an error. Rather the
>
right thing to do is to return a device ID of 0 since the device
>
couldn't be found. This was indeed a bug. The HAL was forgetting to
>
clear the return value if it didn't find the device. Most likely Sean's
>
case was the same thing.
>
>
I just fixed it. Thanks for finding it guys!
Cool! It is definitely better to return a sentinel value if the device is
not found. But I still don't understand why it is not appropriate to return
an error in this case. Basically, I am using this API to say "Find This
Thing For Me". If you can't find it, shouldn't you return an error like
"kAudioDeviceNotFoundError" or "kGUIDDoesNotExistError" -- sort of like the
File Manager returns fnfError (-43) if you try to open a file that does not
exist? Why is it not an error to ask for the device ID of a device that does
not exist in the system?
Best regards,
B.J. Buchalter
Metric Halo
M/S 601 - Building 8
Castle Point Campus
Castle Point, NY 12511-0601 USA
tel +1 845 831-8600
fax +1 603 250-2451
If you haven't heard ChannelStrip yet, you don't know what you're missing!
Check out SpectraFoo, ChannelStrip and Mobile I/O at
http://www.mhlabs.com/
Download a 12 day demo from <
http://www.mhlabs.com/demo/>
_______________________________________________
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.