diff options
author | David Robillard <d@drobilla.net> | 2022-08-10 05:32:03 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:50:53 -0400 |
commit | 1b808ae2d23f4abb8251d69b5fe555cc6923a566 (patch) | |
tree | 102b2336a80f82af02aba8a290450212039b21c8 | |
parent | d362d151889f929ee6d339c788d1052b5a28b10e (diff) | |
download | jalv-1b808ae2d23f4abb8251d69b5fe555cc6923a566.tar.gz jalv-1b808ae2d23f4abb8251d69b5fe555cc6923a566.tar.bz2 jalv-1b808ae2d23f4abb8251d69b5fe555cc6923a566.zip |
Remove lilv dependency from worker.h and worker.c
-rw-r--r-- | src/jalv.c | 5 | ||||
-rw-r--r-- | src/worker.c | 7 | ||||
-rw-r--r-- | src/worker.h | 3 |
3 files changed, 7 insertions, 8 deletions
@@ -644,8 +644,9 @@ jalv_run(Jalv* jalv, uint32_t nframes) lilv_instance_run(jalv->instance, nframes); // Process any worker replies - jalv_worker_emit_responses(&jalv->state_worker, jalv->instance); - jalv_worker_emit_responses(&jalv->worker, jalv->instance); + LV2_Handle handle = lilv_instance_get_handle(jalv->instance); + jalv_worker_emit_responses(&jalv->state_worker, handle); + jalv_worker_emit_responses(&jalv->worker, handle); // Notify the plugin the run() cycle is finished if (jalv->worker.iface && jalv->worker.iface->end_run) { diff --git a/src/worker.c b/src/worker.c index 2abf363..2db0992 100644 --- a/src/worker.c +++ b/src/worker.c @@ -3,6 +3,7 @@ #include "worker.h" +#include "lv2/core/lv2.h" #include "lv2/worker/worker.h" #include "zix/ring.h" #include "zix/sem.h" @@ -115,18 +116,16 @@ jalv_worker_schedule(LV2_Worker_Schedule_Handle handle, } void -jalv_worker_emit_responses(JalvWorker* worker, LilvInstance* instance) +jalv_worker_emit_responses(JalvWorker* worker, LV2_Handle lv2_handle) { if (worker->responses) { uint32_t read_space = zix_ring_read_space(worker->responses); while (read_space) { uint32_t size = 0; zix_ring_read(worker->responses, (char*)&size, sizeof(size)); - zix_ring_read(worker->responses, (char*)worker->response, size); - worker->iface->work_response( - instance->lv2_handle, size, worker->response); + worker->iface->work_response(lv2_handle, size, worker->response); read_space -= sizeof(size) + size; } diff --git a/src/worker.h b/src/worker.h index 606278f..b64fb46 100644 --- a/src/worker.h +++ b/src/worker.h @@ -8,7 +8,6 @@ #include "zix/sem.h" #include "zix/thread.h" -#include "lilv/lilv.h" #include "lv2/core/lv2.h" #include "lv2/worker/worker.h" @@ -51,7 +50,7 @@ jalv_worker_schedule(LV2_Worker_Schedule_Handle handle, const void* data); void -jalv_worker_emit_responses(JalvWorker* worker, LilvInstance* instance); +jalv_worker_emit_responses(JalvWorker* worker, LV2_Handle lv2_handle); #ifdef __cplusplus } // extern "C" |