• 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: HAL Userland driver and preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HAL Userland driver and preferences


  • Subject: Re: HAL Userland driver and preferences
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 17 Sep 2009 11:12:00 -0700

HP_DeviceSettings is obsolete and has been since Leopard. It should have been removed from the SDK, but apparently it slipped my mind for two releases now. You should not use it.

That said, you are free to use any API you like to save and restore your device's settings. There are two caveats I would add. First, you should probably avoid using CFPreferences. CFPreferences works great for applications but is not a reliable way to synchronize live state across many processes, which is what you need to do as a user-land driver.

The other caveat is that you need to write your preferences to a location where they are accessible by all users. For example, /Library/ Preferences is writeable only by users with admin privileges. So, your plug-in running in a process owned by a normal user would not be able to write settings to that location.


On Sep 17, 2009, at 10:39 AM, Airy ANDRE wrote:

Is there some official way to handle preferences for custom properties from a userland HAL driver ?
I couldn't find anything in the docs.


According to the HP_DeviceSettings file from HPBase, it seems things should be saved to /Library/Preferences/ com.apple.audio.DeviceSettings.plist.
But it seems the file is under an "Audio" subdirectory under 10.6, and using a different format.
This Audio directory is writable by coreaudiod, which seems fine, but I've got there a com.apple.audio.DeviceSettings.plist file which is readonly for coreaudiod, so the way HP_DeviceSettings is doing it isn't going to work.


What's the recommended way to do it so it works both on 10.5 on 10.6 ?


--

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


  • Follow-Ups:
    • Re: HAL Userland driver and preferences
      • From: Airy ANDRE <email@hidden>
References: 
 >HAL Userland driver and preferences (From: Airy ANDRE <email@hidden>)

  • Prev by Date: HAL Userland driver and preferences
  • Next by Date: AU support in the new sfront release
  • Previous by thread: HAL Userland driver and preferences
  • Next by thread: Re: HAL Userland driver and preferences
  • Index(es):
    • Date
    • Thread