State.fromInstance

State fromInstance(Plugin plugin, Instance instance, LV2_URID_Map * map, string scratchDir, string copyDir, string linkDir, string saveDir, LilvGetPortValueFunc getValue, void * userData, StateFlags flags, const(LV2_Feature *) * features = null) static

Snapshot state from a live plugin instance.

Directory parameters support advanced file handling (see lilv docs). Pass null for directories you do not need. Pass null for getValue if port values are handled elsewhere. Lower overhead C callback version which is potentially real-time safe (may still allocate though from string conversion).

Parameters

pluginPlugin descriptor
instanceRunning instance
mapURID map
scratchDirPlugin scratch/files directory, or null
copyDirDirectory for copied files shared across saves, or null
linkDirDirectory for hard-linked files, or null
saveDirPer-save directory, or null
getValuePort-value callback, or null
userDataPassed to getValue
flagsValues from StateFlags (IsPod, IsPortable, IsNative)
featuresOptional null-terminated features for LV2_State_Interface.save
State fromInstance(Plugin plugin, Instance instance, LV2_URID_Map * map, string scratchDir, string copyDir, string linkDir, string saveDir, GetPortValueDelegate getValueDg, StateFlags flags, Feature[] features = null) static

Snapshot state from a live plugin instance.

Directory parameters support advanced file handling (see lilv docs). Pass null for directories you do not need. Pass null for getValueDg if port values are handled elsewhere. Uses a delegate instead of a C callback and dynamic array of Feature structures which may result in GC allocation and is NOT real-time safe.

Parameters

pluginPlugin descriptor
instanceRunning instance
mapURID map
scratchDirPlugin scratch/files directory, or null
copyDirDirectory for copied files shared across saves, or null
linkDirDirectory for hard-linked files, or null
saveDirPer-save directory, or null
getValueDgPort-value callback, or null
flagsValues from StateFlags (IsPod, IsPortable, IsNative)
featuresOptional null-terminated features for LV2_State_Interface.save