• 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: Jeff Moore <email@hidden>
  • Date: Wed, 23 Apr 2003 11:18:31 -0700

How could AudioHardwareGetProperty() return an error? You passed an address, just not an address that pointed to a valid CFStringRef. There really isn't a way to validate a random address like that. The best it can do is check to see if you passed NULL.

I imagine that what you were doing was corrupting your heap, thus setting up the conditions for a very hard to track down random crash bug.

On Wednesday, April 23, 2003, at 09:53 AM, Sean McBride wrote:

Brad Ford (email@hidden) wrote on Wed, 23 Apr 2003 09:26:13 -0700:

I tried this:

AudioDeviceID myDevice;
AudioValueTranslation trans;
trans.mInputData = (void*)CFSTR ("AppleDBDMAAudioEngine:0");

There's your problem. You need to pass a POINTER to a CFStringRef.
Like this:

CFStringRef myKnownUID = CFSTR("AppleDBDMAAudioEngine:0");
trans.mInputData = &myKnownUID;

Thanks Brad! I should have been more suspicious of the need to cast.

Shouldn't AudioHardwareGetProperty() have returned me an error though?
Perhaps I'm lucky it didn't crash. :)

Thanks!

--
____________________________________________________________
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.



--

Jeff Moore
Core Audio
Apple
_______________________________________________
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: "B.J. Buchalter" <email@hidden>
    • 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: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Proper behaviour when failing a PerformFormatChange or InputSelec torChange
  • 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