aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-19 16:43:13 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-19 16:43:53 +0100
commitf90024027d711a89021080338ea7ef43a5b84a0f (patch)
tree3172d215b72fb81789587c1c040306bc3c8061ee
parentae68004f247ccd5f608de676674f9ee8f3eaeaa8 (diff)
downloadvm.lv2-f90024027d711a89021080338ea7ef43a5b84a0f.tar.xz
send initial patch:Get.
-rw-r--r--VERSION2
-rw-r--r--vm_ui.c18
2 files changed, 19 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index 17e51c3..29ab263 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.1
+0.1.2801
diff --git a/vm_ui.c b/vm_ui.c
index 2efc850..964542a 100644
--- a/vm_ui.c
+++ b/vm_ui.c
@@ -195,6 +195,22 @@ _deref(LV2_Atom_Forge_Sink_Handle handle, LV2_Atom_Forge_Ref ref)
}
static void
+_restore_state(plughandle_t *handle)
+{
+ atom_ser_t *ser = &handle->ser;
+ ser->offset = 0;
+ lv2_atom_forge_set_sink(&handle->forge, _sink, _deref, ser);
+
+ LV2_Atom_Forge_Frame frame;
+ lv2_atom_forge_object(&handle->forge, &frame, 0, handle->props.urid.patch_get);
+ lv2_atom_forge_pop(&handle->forge, &frame);
+
+ const LV2_Atom *atom = ser->atom;
+ handle->writer(handle->controller, 0, lv2_atom_total_size(atom),
+ handle->atom_eventTransfer, atom);
+}
+
+static void
_set_property(plughandle_t *handle, LV2_URID property)
{
atom_ser_t *ser = &handle->ser;
@@ -500,6 +516,8 @@ instantiate(const LV2UI_Descriptor *descriptor, const char *plugin_uri,
ser->size = 1024;
ser->buf = malloc(ser->size);
+ _restore_state(handle);
+
return handle;
}