|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
B.J. Buchalter (email@hidden) wrote on Thu, 24 Apr 2003 13:02:45 -0400:
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?
I agree. It also makes AudioHardwareGetProperty() harder to use, because
one has to check BOTH the error and the device id to see if it succeeded.
I'd much rather check only one... Reminds me of this:
h = NewHandle()
if ((h != nil) && (MemError() != noErr))
...
Which I've seen a lot....
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer +1-514-822-6000
Matrox Electronic Systems Ltd. Montrial, Quibec, Canada
_______________________________________________
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.
| References: | |
| >Re: Getting an AudioDeviceID from device unique identifier (UID) (From: "Sean McBride" <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.