diff options
author | David Robillard <d@drobilla.net> | 2022-08-10 13:09:15 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:50:59 -0400 |
commit | e3c955522472d147e5c01d55936cdf459b3df9fb (patch) | |
tree | 6c36339ab774d49453114bdb173f1c998468055b /src | |
parent | 32b02177111d9092fb87a3b496c75d242c4be9cb (diff) | |
download | jalv-e3c955522472d147e5c01d55936cdf459b3df9fb.tar.gz jalv-e3c955522472d147e5c01d55936cdf459b3df9fb.tar.bz2 jalv-e3c955522472d147e5c01d55936cdf459b3df9fb.zip |
Clarify communication function names
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv.c | 33 | ||||
-rw-r--r-- | src/jalv_internal.h | 10 | ||||
-rw-r--r-- | src/state.c | 2 |
3 files changed, 23 insertions, 22 deletions
@@ -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) { |