• 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: kAudioHardwarePropertyDeviceForUID ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kAudioHardwarePropertyDeviceForUID ???


  • Subject: Re: kAudioHardwarePropertyDeviceForUID ???
  • From: Baron <email@hidden>
  • Date: Fri, 20 Sep 2002 09:31:22 -0700

You are getting the expected results. Every time the device comes and goes,
it is going to have a different AudioDeviceID value. That's why you use the
UID in first place. Since it is a unique and persistent identifier across
processes and boots, you can always get the valid AudioDeviceID for the
device that you care about.

note: If you are using a USB device for example, it will have a different
UID for each USB port in which it is connected.

bob aron
--
CoreAudio Team
Apple Computer Inc.


> Hi Folks,
>
> I have been using the kAudioHardwarePropertyDeviceForUID AudioHardware
> property to get the current audio device for a saved GUID reference. I am
> absolutely sure that the device exists in the system and is unique. I use
> the following code:
>
> AudioValueTranslation avt = {&audioGUID,
> sizeof(audioGUID),
> &fAudioDevice,
> sizeof(fAudioDevice)};
> UInt32 avt_len = sizeof(avt);
> char guidbuf[256];
> OSStatus result =
> AudioHardwareGetProperty(kAudioHardwarePropertyDeviceForUID,
> &avt_len, &avt);
>
>
> I find that the first time I do this in a run of my app, it works fine. If I
> make the device go away and come back I find that the call completes with no
> error but the AudioDeviceID I receive is garbage. For example:
>
> result = 0
> fAudioDevice = 79
>
> But the actual device id for the GUID I am trying to get is 46.
>
> So, is there some lifetime thing that I am missing here or is this a genuine
> bug.
>
> I have also submitted this as Radar #3056119
>
> 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.
_______________________________________________
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: kAudioHardwarePropertyDeviceForUID ???
      • From: "B.J. Buchalter" <email@hidden>
    • Re: kAudioHardwarePropertyDeviceForUID ???
      • From: Michael Thornburgh <email@hidden>
References: 
 >kAudioHardwarePropertyDeviceForUID ??? (From: "B.J. Buchalter" <email@hidden>)

  • Prev by Date: my first AudioUnits...
  • Next by Date: Re: kAudioHardwarePropertyDeviceForUID ???
  • Previous by thread: kAudioHardwarePropertyDeviceForUID ???
  • Next by thread: Re: kAudioHardwarePropertyDeviceForUID ???
  • Index(es):
    • Date
    • Thread