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) staticSnapshot 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
plugin | Plugin descriptor |
instance | Running instance |
map | URID map |
scratchDir | Plugin scratch/files directory, or null |
copyDir | Directory for copied files shared across saves, or null |
linkDir | Directory for hard-linked files, or null |
saveDir | Per-save directory, or null |
getValue | Port-value callback, or null |
userData | Passed to getValue |
flags | Values from StateFlags (IsPod, IsPortable, IsNative) |
features | Optional 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) staticSnapshot 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
plugin | Plugin descriptor |
instance | Running instance |
map | URID map |
scratchDir | Plugin scratch/files directory, or null |
copyDir | Directory for copied files shared across saves, or null |
linkDir | Directory for hard-linked files, or null |
saveDir | Per-save directory, or null |
getValueDg | Port-value callback, or null |
flags | Values from StateFlags (IsPod, IsPortable, IsNative) |
features | Optional null-terminated features for LV2_State_Interface.save |