Q:

Add a string parameter to an AudioUnit

For instance, this AudioUnit has to connect to a host through the network, and the hostname has to be configured in a Cocoa View, and has to be saved so that reloading the project restores the hostname.
How would you do that (interface + parameter saving, apart from the network thing of course)?

A:

You need to implement the SaveState() and RestoreState() methods in your AudioUnit.  These functions will be called when the sequencer saves and opens a document, respectively, and give you the chance to store data alongside a particular plugin instance.
The definition for these functions can be found in the file AUBase.h in the AudioUnit SDK.

