• 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: How to use IOAudioDeviceIconName property?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use IOAudioDeviceIconName property?


  • Subject: Re: How to use IOAudioDeviceIconName property?
  • From: Jeff Moore <email@hidden>
  • Date: Mon, 27 Apr 2009 11:32:21 -0700




On Apr 27, 2009, at 8:34 AM, Daniel Mack wrote:

there is a property defined in IOAudioDefines.h called
kIOAudioDeviceIconNameKey. I'd guess this is about the little picture
shown in applications like AMS,

This is correct. kIOAudioDeviceIconNameKey along with kIOAudioDeviceIconTypeKey and kIOAudioDeviceIconSubDirKey are used to describe an icon in your driver's resource bundle that can be used by a user-space entity.


but I wonder how to use it from a kernel
driver. Which kind of object should be associated with it, what are the
constraints? Googl'ing didn't help much.

I'm not sure I'm following the question. Do you want to use an icon in the kernel or are you trying to supply an icon for your device to user- space? I'm not sure why you'd want to do the former, but for the latter to supply an icon for user-space programs to use, you need to do a few things.


First, your driver has to supply a resource bundle that the HAL can load. The driver tells the HAL the path to this bundle via the registry property on the IOAudioEngine or IOAudioDevice object with the key kIOAudioDeviceLocalizedBundleKey. The value is a path to the resource bundle that is relative to /System/Library/Extensions. There is an example of a driver supplying this bundle in the AudioReflectorDriver sample code in our SDK.

Once you have a resource bundle for your driver, the icon is a resource in that bundle. The driver specifies where using the registry keys kIOAudioDeviceIconNameKey, kIOAudioDeviceIconTypeKey and kIOAudioDeviceIconSubDirKey. The values for these keys are the strings that are to be passed to like so:
CFBundleCopyResourceURL(yourResourceBundle, theIconName, theIconType, theSubDirName)



--

Jeff Moore
Core Audio
Apple


_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >How to use IOAudioDeviceIconName property? (From: Daniel Mack <email@hidden>)

  • Prev by Date: Re: losing MIDI input
  • Next by Date: Re: Audio queues...again
  • Previous by thread: How to use IOAudioDeviceIconName property?
  • Next by thread: AU inserts at device level
  • Index(es):
    • Date
    • Thread