When to use CopyFromStorage/WriteToStorage?
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