aboutsummaryrefslogtreecommitdiff
path: root/midi_inspector.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-04-06 16:01:26 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-04-06 16:01:26 +0200
commit288b25dec6d06c2594b9a23f2619d1b81c1f659d (patch)
treee1e322a7e67e4f1a35999935975124eff6fc7ef2 /midi_inspector.c
parent2c9f90ba6238c0cfb7fbd1c1025efebcd0818f25 (diff)
downloadsherlock.lv2-288b25dec6d06c2594b9a23f2619d1b81c1f659d.tar.xz
fixes for updated props.lv2.
Diffstat (limited to 'midi_inspector.c')
-rw-r--r--midi_inspector.c37
1 files changed, 5 insertions, 32 deletions
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;
}