• 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
How to use AudioHardwareGetProperty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use AudioHardwareGetProperty


  • Subject: How to use AudioHardwareGetProperty
  • From: Malcolm Haylock <email@hidden>
  • Date: Thu, 7 Aug 2003 10:13:53 +0100

Hi everyone,

I'm not quite sure how to use AudioHardwareGetProperty to retrieve the AudioDeviceID for a particular unique ID, but this question applies to retrieving any value which requires input.

extern OSStatus AudioHardwareGetProperty(
AudioHardwarePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData);

As I understand it (by guessing from the "documentation"), both the input and output are passed by the same pointer outPropertyData. Therefore to pass the UID and return the AudioDeviceID would be something like:

CFStringRef uid; // set somewhere else
Ptr outPropertyData=uid;
UInt32 ioPropertyDataSize=sizeof(uid);
OSStatus err=AudioHardwareGetProperty(
kAudioHardwarePropertyDeviceForUID,
&ioPropertyDataSize,
outPropertyData);
AudioDeviceID id=*((AudioDeviceID*) outPropertyData);

I'm probably way off the mark here but please correct me.


From AudioHardware.h kAudioHardwarePropertyDeviceForUID = 'duid',
// retrieves the AudioDeviceID for the given device
// unique identifier previously retrieved with
// kAudioDevicePropertyUID (see below) using an
// AudioValueTranslation structure. The input is a
// CFStringRef containing the UID and the output
// is an AudioDeviceID.

Thanks,
Malcolm Haylock
_______________________________________________
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: How to use AudioHardwareGetProperty
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: AU MIDI events scheduled beyond next rendering slice
  • Next by Date: Re: How to use AudioHardwareGetProperty
  • Previous by thread: Re: AU MIDI events scheduled beyond next rendering slice
  • Next by thread: Re: How to use AudioHardwareGetProperty
  • Index(es):
    • Date
    • Thread