From e3c955522472d147e5c01d55936cdf459b3df9fb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 10 Aug 2022 13:09:15 -0400 Subject: Clarify communication function names --- src/jalv.c | 33 +++++++++++++++++---------------- src/jalv_internal.h | 10 +++++----- src/state.c | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/jalv.c b/src/jalv.c index 4655785..7bedc4e 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -402,11 +402,11 @@ jalv_set_control(Jalv* jalv, lv2_atom_forge_write(&forge, body, size); const LV2_Atom* atom = lv2_atom_forge_deref(&forge, frame.ref); - jalv_ui_write(jalv, - jalv->control_in, - lv2_atom_total_size(atom), - jalv->urids.atom_eventTransfer, - atom); + jalv_send_to_plugin(jalv, + jalv->control_in, + lv2_atom_total_size(atom), + jalv->urids.atom_eventTransfer, + atom); } } @@ -425,7 +425,8 @@ void jalv_ui_instantiate(Jalv* jalv, const char* native_ui_type, void* parent) { #if USE_SUIL - jalv->ui_host = suil_host_new(jalv_ui_write, jalv_ui_port_index, NULL, NULL); + jalv->ui_host = + suil_host_new(jalv_send_to_plugin, jalv_ui_port_index, NULL, NULL); const LV2_Feature parent_feature = {LV2_UI__parent, parent}; @@ -494,11 +495,11 @@ jalv_ui_is_resizable(Jalv* jalv) } void -jalv_ui_write(void* const jalv_handle, - uint32_t port_index, - uint32_t buffer_size, - uint32_t protocol, - const void* buffer) +jalv_send_to_plugin(void* const jalv_handle, + uint32_t port_index, + uint32_t buffer_size, + uint32_t protocol, + const void* buffer) { Jalv* const jalv = (Jalv*)jalv_handle; @@ -586,11 +587,11 @@ jalv_init_ui(Jalv* jalv) lv2_atom_forge_object(&forge, &frame, 0, jalv->urids.patch_Get); const LV2_Atom* atom = lv2_atom_forge_deref(&forge, frame.ref); - jalv_ui_write(jalv, - jalv->control_in, - lv2_atom_total_size(atom), - jalv->urids.atom_eventTransfer, - atom); + jalv_send_to_plugin(jalv, + jalv->control_in, + lv2_atom_total_size(atom), + jalv->urids.atom_eventTransfer, + atom); lv2_atom_forge_pop(&forge, &frame); } } diff --git a/src/jalv_internal.h b/src/jalv_internal.h index e83585c..ab7a1eb 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -159,11 +159,11 @@ bool jalv_ui_is_resizable(Jalv* jalv); void -jalv_ui_write(void* jalv_handle, - uint32_t port_index, - uint32_t buffer_size, - uint32_t protocol, - const void* buffer); +jalv_send_to_plugin(void* jalv_handle, + uint32_t port_index, + uint32_t buffer_size, + uint32_t protocol, + const void* buffer); void jalv_apply_ui_events(Jalv* jalv, uint32_t nframes); diff --git a/src/state.c b/src/state.c index c6037f3..5b57026 100644 --- a/src/state.c +++ b/src/state.c @@ -155,7 +155,7 @@ set_port_value(const char* port_symbol, port->control = fvalue; } else { // Send value to running plugin - jalv_ui_write(jalv, port->index, sizeof(fvalue), 0, &fvalue); + jalv_send_to_plugin(jalv, port->index, sizeof(fvalue), 0, &fvalue); } if (jalv->has_ui) { -- cgit v1.2.1