• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting an AudioDeviceID from device unique identifier (UID)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting an AudioDeviceID from device unique identifier (UID)


  • Subject: Re: Getting an AudioDeviceID from device unique identifier (UID)
  • From: "Sean McBride" <email@hidden>
  • Date: Thu, 24 Apr 2003 13:32:23 -0400
  • Organization: Matrox Electronic Systems Ltd.

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.

  • Follow-Ups:
    • Re: Getting an AudioDeviceID from device unique identifier (UID)
      • From: Jeff Moore <email@hidden>
References: 
 >Re: Getting an AudioDeviceID from device unique identifier (UID) (From: "B.J. Buchalter" <email@hidden>)

  • Prev by Date: Re: Core Audio HAL Localization
  • Next by Date: Re: Getting an AudioDeviceID from device unique identifier (UID)
  • Previous by thread: Re: Getting an AudioDeviceID from device unique identifier (UID)
  • Next by thread: Re: Getting an AudioDeviceID from device unique identifier (UID)
  • Index(es):
    • Date
    • Thread