• 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
When to use CopyFromStorage/WriteToStorage?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When to use CopyFromStorage/WriteToStorage?


  • Subject: When to use CopyFromStorage/WriteToStorage?
  • From: Ploytec <email@hidden>
  • Date: Mon, 17 Mar 2014 21:20:19 +0100

Hi,

I'm trying to manage my prefs using CopyFromStorage/WriteToStorage.

I need to read them at least when I activate my device, and write them when I deactivate my device (as it's a USB device, it means at plug/unplug time).

I started from the samples, and used the Activate and Deactivate methods.
However, at startup, or when coreaudiod restarts, the Activate method (called in this situation by the "CFPlugIn factory function") comes before the Initialize method of AudioServerPlugInDriverInterface.
Since Initialize is the method where the AudioServerPlugInHostRef, that is needed to access the storage, is passed to the driver, this is impossible to read prefs from storage in the Activate method when coroaudiod starts up.

What is the correct way to achieve this?

Thanks
Eric Goroubben


 _______________________________________________
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: When to use CopyFromStorage/WriteToStorage?
      • From: Jeff Moore <email@hidden>
  • Prev by Date: AUGraph remove NodeInputCallback
  • Next by Date: Re: When to use CopyFromStorage/WriteToStorage?
  • Previous by thread: AUGraph remove NodeInputCallback
  • Next by thread: Re: When to use CopyFromStorage/WriteToStorage?
  • Index(es):
    • Date
    • Thread