Read the extra state of your plugin from a chunk, to restore a former save.
You would typically deserialize arbitrary stuff with dplug.core.binrange.
This is called on session load or on preset load (IF the preset had a state chunk),
but this isn't called on plugin instantiation.
Note: Using state chunks comes with a BIG challenge of making your own synchronization
with the UI. You can expect any thread to call saveState and loadState.
A proper design would probably have you represent state in the editor and the
audio client separately, with a clean interchange.
Important: This should successfully parse whatever the "default state" is
so that makeDefaultPreset() can work.
Read the extra state of your plugin from a chunk, to restore a former save. You would typically deserialize arbitrary stuff with dplug.core.binrange.
This is called on session load or on preset load (IF the preset had a state chunk), but this isn't called on plugin instantiation.
Note: Using state chunks comes with a BIG challenge of making your own synchronization with the UI. You can expect any thread to call saveState and loadState. A proper design would probably have you represent state in the editor and the audio client separately, with a clean interchange.
Important: This should successfully parse whatever the "default state" is so that makeDefaultPreset() can work.