aboutsummaryrefslogtreecommitdiff
path: root/atom_inspector.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-18 12:01:17 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-18 12:01:17 +0100
commit6b44a44c189198d4ba212d65d37b56d836089f3c (patch)
tree59be470f69358fcfdfc0160a8731cfbdbf67c6f1 /atom_inspector.c
parent6ca13cb62f077b7e28407f9ced62cd7b699bb503 (diff)
downloadsherlock.lv2-6b44a44c189198d4ba212d65d37b56d836089f3c.tar.xz
fixes for updated props.lv2.
Diffstat (limited to 'atom_inspector.c')
-rw-r--r--atom_inspector.c38
1 files changed, 31 insertions, 7 deletions
diff --git a/atom_inspector.c b/atom_inspector.c
index 9e71b43..bf46589 100644
--- a/atom_inspector.c
+++ b/atom_inspector.c
@@ -71,9 +71,7 @@ instantiate(const LV2_Descriptor* descriptor, double rate,
return NULL;
}
- if( !props_register(&handle->props, &stat_overwrite, &handle->state.overwrite, &handle->stash.overwrite)
- || !props_register(&handle->props, &stat_block, &handle->state.block, &handle->stash.block)
- || !props_register(&handle->props, &stat_follow, &handle->state.follow, &handle->stash.follow) )
+ if(!props_register(&handle->props, defs, MAX_NPROPS, &handle->state, &handle->stash))
{
free(handle);
return NULL;
@@ -196,7 +194,7 @@ _state_save(LV2_Handle instance, LV2_State_Store_Function store,
{
handle_t *handle = instance;
- return props_save(&handle->props, &handle->forge, store, state, flags, features);
+ return props_save(&handle->props, store, state, flags, features);
}
static LV2_State_Status
@@ -206,7 +204,7 @@ _state_restore(LV2_Handle instance, LV2_State_Retrieve_Function retrieve,
{
handle_t *handle = instance;
- return props_restore(&handle->props, &handle->forge, retrieve, state, flags, features);
+ return props_restore(&handle->props, retrieve, state, flags, features);
}
static const LV2_State_Interface state_iface = {
@@ -214,11 +212,37 @@ static const LV2_State_Interface state_iface = {
.restore = _state_restore
};
-static const void *
-extension_data(const char *uri)
+static inline LV2_Worker_Status
+_work(LV2_Handle instance, LV2_Worker_Respond_Function respond,
+LV2_Worker_Respond_Handle worker, uint32_t size, const void *body)
+{
+ handle_t *handle = instance;
+
+ return props_work(&handle->props, respond, worker, size, body);
+}
+
+static inline LV2_Worker_Status
+_work_response(LV2_Handle instance, uint32_t size, const void *body)
+{
+ handle_t *handle = instance;
+
+ return props_work_response(&handle->props, size, body);
+}
+
+static const LV2_Worker_Interface work_iface = {
+ .work = _work,
+ .work_response = _work_response,
+ .end_run = NULL
+};
+
+static const void*
+extension_data(const char* uri)
{
if(!strcmp(uri, LV2_STATE__interface))
return &state_iface;
+ else if(!strcmp(uri, LV2_WORKER__interface))
+ return &work_iface;
+
return NULL;
}