diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/worker.c | 22 | ||||
-rw-r--r-- | src/worker.h | 5 |
2 files changed, 11 insertions, 16 deletions
diff --git a/src/worker.c b/src/worker.c index ad7bf91..550e594 100644 --- a/src/worker.c +++ b/src/worker.c @@ -16,6 +16,17 @@ #include "worker.h" +LV2_Worker_Status +jalv_worker_respond(LV2_Worker_Respond_Handle handle, + uint32_t size, + const void* data) +{ + Jalv* jalv = (Jalv*)handle; + jack_ringbuffer_write(jalv->worker.responses, (const char*)&size, sizeof(size)); + jack_ringbuffer_write(jalv->worker.responses, data, size); + return LV2_WORKER_SUCCESS; +} + static void* worker_func(void* data) { @@ -77,17 +88,6 @@ jalv_worker_schedule(LV2_Worker_Schedule_Handle handle, return LV2_WORKER_SUCCESS; } -LV2_Worker_Status -jalv_worker_respond(LV2_Worker_Respond_Handle handle, - uint32_t size, - const void* data) -{ - Jalv* jalv = (Jalv*)handle; - jack_ringbuffer_write(jalv->worker.responses, (const char*)&size, sizeof(size)); - jack_ringbuffer_write(jalv->worker.responses, data, size); - return LV2_WORKER_SUCCESS; -} - void jalv_worker_emit_responses(Jalv* jalv, JalvWorker* worker) { diff --git a/src/worker.h b/src/worker.h index 08b84fa..f454ce7 100644 --- a/src/worker.h +++ b/src/worker.h @@ -31,10 +31,5 @@ jalv_worker_schedule(LV2_Worker_Schedule_Handle handle, uint32_t size, const void* data); -LV2_Worker_Status -jalv_worker_respond(LV2_Worker_Respond_Handle handle, - uint32_t size, - const void* data); - void jalv_worker_emit_responses(Jalv* jalv, JalvWorker* worker); |