diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2017-03-18 12:01:17 +0100 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2017-03-18 12:01:17 +0100 |
commit | 6b44a44c189198d4ba212d65d37b56d836089f3c (patch) | |
tree | 59be470f69358fcfdfc0160a8731cfbdbf67c6f1 /osc_inspector.c | |
parent | 6ca13cb62f077b7e28407f9ced62cd7b699bb503 (diff) | |
download | sherlock.lv2-6b44a44c189198d4ba212d65d37b56d836089f3c.tar.xz |
fixes for updated props.lv2.
Diffstat (limited to 'osc_inspector.c')
-rw-r--r-- | osc_inspector.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/osc_inspector.c b/osc_inspector.c index f3ebb58..28f1cb6 100644 --- a/osc_inspector.c +++ b/osc_inspector.c @@ -76,9 +76,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; @@ -217,7 +215,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 @@ -227,7 +225,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 = { @@ -235,11 +233,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; } |