• 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
Getting an AudioDeviceID from device unique identifier (UID)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting an AudioDeviceID from device unique identifier (UID)


  • Subject: Getting an AudioDeviceID from device unique identifier (UID)
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 23 Apr 2003 10:29:44 -0400
  • Organization: Matrox Electronic Systems Ltd.

Hi all,

I'm trying to get an AudioDeviceID from a known device unique identifier
(UID). kAudioHardwarePropertyDeviceForUID and
kAudioDevicePropertyDeviceUID look useful but the only info I found on
the net was qa1206, which does something similar to what I want by
iterating over all devices, but it seems there should be a more direct way.

I tried this:

AudioDeviceID myDevice;
AudioValueTranslation trans;
trans.mInputData = (void*)CFSTR ("AppleDBDMAAudioEngine:0");
trans.mInputDataSize = sizeof (CFStringRef);
trans.mOutputData = &myDevice;
trans.mOutputDataSize = sizeof (AudioDeviceID);
UInt32 size = sizeof (AudioValueTranslation);
OSStatus err = AudioHardwareGetProperty (
kAudioHardwarePropertyDeviceForUID,
&size,
&trans);

Which seems right based on the comments in AudioHardware.h. It returns
noErr, but myDevice is no good. I'm a CoreAudio newbie, so maybe the
error is obvious. :)

Thanks for any help,

--
____________________________________________________________
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: Brad Ford <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: NSData or Small Socket Help
  • Next by thread: Re: Getting an AudioDeviceID from device unique identifier (UID)
  • Index(es):
    • Date
    • Thread