Question

I am writing an app that hosts apple system supplied audiounits. I would like to save the parameter states of an audiounit after a user has dialed them in and restore them when the user loads the audiounit again.

I can't find out to do this from a host. I've seen that AUs should have SaveState() and RestoreState() methods, but how do you access them?

Was it helpful?

Solution

Basically, you handle them by getting or setting the kAudioUnitProperty_ClassInfo property with AudioUnitGetProperty() or AudioUnitSetProperty() (for saving and restoring, respectively).

You can see an example implementation of this in the DestroyFX Audio Unit utilities library in the methods RestoreAUStateFromPresetFile() and SaveAUStateToPresetFile_Bundle() in the dfx-au-utilities-preset-files.c file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top