• 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: "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.

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

  • Prev by Date: Re: Getting an AudioDeviceID from device unique identifier (UID)
  • Next by Date: Re: Core Audio HAL Localization
  • 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