开发者

How to save and restore an audiounit's state as an audiounit host

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 restor开发者_Python百科e 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜