diff options
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | atom_inspector.c | 37 | ||||
-rw-r--r-- | midi_inspector.c | 37 | ||||
-rw-r--r-- | osc_inspector.c | 37 | ||||
-rw-r--r-- | sherlock.ttl | 13 | ||||
-rw-r--r-- | sherlock_nk.c | 10 |
6 files changed, 25 insertions, 111 deletions
@@ -1 +1 @@ -0.13.47 +0.13.53 diff --git a/atom_inspector.c b/atom_inspector.c index bf46589..3c18ad5 100644 --- a/atom_inspector.c +++ b/atom_inspector.c @@ -64,19 +64,15 @@ instantiate(const LV2_Descriptor* descriptor, double rate, lv2_atom_forge_init(&handle->forge, handle->map); - if(!props_init(&handle->props, MAX_NPROPS, descriptor->URI, handle->map, handle)) + if(!props_init(&handle->props, descriptor->URI, + defs, MAX_NPROPS, &handle->state, &handle->stash, + handle->map, handle)) { fprintf(stderr, "failed to allocate property structure\n"); free(handle); return NULL; } - if(!props_register(&handle->props, defs, MAX_NPROPS, &handle->state, &handle->stash)) - { - free(handle); - return NULL; - } - return handle; } @@ -117,6 +113,8 @@ run(LV2_Handle instance, uint32_t nsamples) lv2_atom_forge_set_buffer(forge, (uint8_t *)handle->control_out, capacity); ref = lv2_atom_forge_sequence_head(forge, &frame, 0); + props_idle(&handle->props, forge, 0, &ref); + LV2_ATOM_SEQUENCE_FOREACH(handle->control_in, ev) { const LV2_Atom_Object *obj = (const LV2_Atom_Object *)&ev->body; @@ -212,36 +210,11 @@ static const LV2_State_Interface state_iface = { .restore = _state_restore }; -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; } diff --git a/midi_inspector.c b/midi_inspector.c index 761fb09..95cd500 100644 --- a/midi_inspector.c +++ b/midi_inspector.c @@ -69,19 +69,15 @@ instantiate(const LV2_Descriptor* descriptor, double rate, lv2_atom_forge_init(&handle->forge, handle->map); - if(!props_init(&handle->props, MAX_NPROPS, descriptor->URI, handle->map, handle)) + if(!props_init(&handle->props, descriptor->URI, + defs, MAX_NPROPS, &handle->state, &handle->stash, + handle->map, handle)) { fprintf(stderr, "failed to allocate property structure\n"); free(handle); return NULL; } - if(!props_register(&handle->props, defs, MAX_NPROPS, &handle->state, &handle->stash)) - { - free(handle); - return NULL; - } - return handle; } @@ -123,6 +119,8 @@ run(LV2_Handle instance, uint32_t nsamples) lv2_atom_forge_set_buffer(forge, (uint8_t *)handle->control_out, capacity); ref = lv2_atom_forge_sequence_head(forge, frame, 0); + props_idle(&handle->props, forge, 0, &ref); + LV2_ATOM_SEQUENCE_FOREACH(handle->control_in, ev) { const LV2_Atom_Object *obj = (const LV2_Atom_Object *)&ev->body; @@ -231,36 +229,11 @@ static const LV2_State_Interface state_iface = { .restore = _state_restore }; -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; } diff --git a/osc_inspector.c b/osc_inspector.c index 28f1cb6..69e09fd 100644 --- a/osc_inspector.c +++ b/osc_inspector.c @@ -69,19 +69,15 @@ instantiate(const LV2_Descriptor* descriptor, double rate, lv2_osc_urid_init(&handle->osc_urid, handle->map); lv2_atom_forge_init(&handle->forge, handle->map); - if(!props_init(&handle->props, MAX_NPROPS, descriptor->URI, handle->map, handle)) + if(!props_init(&handle->props, descriptor->URI, + defs, MAX_NPROPS, &handle->state, &handle->stash, + handle->map, handle)) { fprintf(stderr, "failed to allocate property structure\n"); free(handle); return NULL; } - if(!props_register(&handle->props, defs, MAX_NPROPS, &handle->state, &handle->stash)) - { - free(handle); - return NULL; - } - return handle; } @@ -123,6 +119,8 @@ run(LV2_Handle instance, uint32_t nsamples) lv2_atom_forge_set_buffer(forge, (uint8_t *)handle->control_out, capacity); ref = lv2_atom_forge_sequence_head(forge, frame, 0); + props_idle(&handle->props, forge, 0, &ref); + LV2_ATOM_SEQUENCE_FOREACH(handle->control_in, ev) { const LV2_Atom_Object *obj = (const LV2_Atom_Object *)&ev->body; @@ -233,36 +231,11 @@ static const LV2_State_Interface state_iface = { .restore = _state_restore }; -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; } diff --git a/sherlock.ttl b/sherlock.ttl index 41c8dcf..b14169a 100644 --- a/sherlock.ttl +++ b/sherlock.ttl @@ -24,7 +24,6 @@ @prefix urid: <http://lv2plug.in/ns/ext/urid#> . @prefix patch: <http://lv2plug.in/ns/ext/patch#> . @prefix state: <http://lv2plug.in/ns/ext/state#> . -@prefix work: <http://lv2plug.in/ns/ext/worker#> . @prefix xpress: <http://open-music-kontrollers.ch/lv2/xpress#> . @prefix osc: <http://open-music-kontrollers.ch/lv2/osc#> . @@ -82,8 +81,8 @@ sherlock:atom_inspector doap:license lic:Artistic-2.0 ; lv2:project proj:sherlock ; lv2:optionalFeature lv2:isLive, lv2:hardRTCapable, state:threadSafeRestore ; - lv2:requiredFeature urid:map, state:loadDefaultState, work:schedule ; - lv2:extensionData state:interface, work:interface; + lv2:requiredFeature urid:map, state:loadDefaultState ; + lv2:extensionData state:interface ; lv2:port [ # input event port @@ -144,8 +143,8 @@ sherlock:midi_inspector doap:license lic:Artistic-2.0 ; lv2:project proj:sherlock ; lv2:optionalFeature lv2:isLive, lv2:hardRTCapable, state:threadSafeRestore ; - lv2:requiredFeature urid:map, state:loadDefaultState, work:schedule ; - lv2:extensionData state:interface, work:interface; + lv2:requiredFeature urid:map, state:loadDefaultState ; + lv2:extensionData state:interface ; lv2:port [ # input event port @@ -200,8 +199,8 @@ sherlock:osc_inspector doap:license lic:Artistic-2.0 ; lv2:project proj:sherlock ; lv2:optionalFeature lv2:isLive, lv2:hardRTCapable, state:threadSafeRestore ; - lv2:requiredFeature urid:map, state:loadDefaultState, work:schedule ; - lv2:extensionData state:interface, work:interface; + lv2:requiredFeature urid:map, state:loadDefaultState ; + lv2:extensionData state:interface ; lv2:port [ # input event port diff --git a/sherlock_nk.c b/sherlock_nk.c index 311fb41..b0d5cde 100644 --- a/sherlock_nk.c +++ b/sherlock_nk.c @@ -271,19 +271,15 @@ instantiate(const LV2UI_Descriptor *descriptor, const char *plugin_uri, handle->write_function = write_function; handle->controller = controller; - if(!props_init(&handle->props, MAX_NPROPS, plugin_uri, handle->map, handle)) + if(!props_init(&handle->props, descriptor->URI, + defs, MAX_NPROPS, &handle->state, &handle->stash, + handle->map, handle)) { fprintf(stderr, "failed to allocate property structure\n"); free(handle); return NULL; } - if(!props_register(&handle->props, defs, MAX_NPROPS, &handle->state, &handle->stash)) - { - free(handle); - return NULL; - } - handle->urid.overwrite = props_map(&handle->props, defs[0].property);; handle->urid.block = props_map(&handle->props, defs[1].property);; handle->urid.follow = props_map(&handle->props, defs[2].property);; |