aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-10 13:41:17 -0400
committerDavid Robillard <d@drobilla.net>2022-08-17 13:51:02 -0400
commitc17c67cdba3045be3c4a0f65dac0039987e0d8cf (patch)
tree03b0c9c7be06892a6c2ac128ecf34008f167c9f7
parent980e0aad7e87c08701958853792052fb78ed1900 (diff)
downloadjalv-c17c67cdba3045be3c4a0f65dac0039987e0d8cf.tar.gz
jalv-c17c67cdba3045be3c4a0f65dac0039987e0d8cf.tar.bz2
jalv-c17c67cdba3045be3c4a0f65dac0039987e0d8cf.zip
Fix misleading variable name
An atom also has a "body", and sometimes this "body" is itself an atom.
-rw-r--r--src/jalv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jalv.c b/src/jalv.c
index f982f1b..af045fb 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -541,8 +541,8 @@ jalv_apply_ui_events(Jalv* jalv, uint32_t nframes)
for (size_t i = 0; i < space; i += sizeof(ev) + ev.size) {
zix_ring_read(jalv->ui_to_plugin, &ev, sizeof(ev));
- char body[MSG_BUFFER_SIZE];
- if (zix_ring_read(jalv->ui_to_plugin, body, ev.size) != ev.size) {
+ char buffer[MSG_BUFFER_SIZE];
+ if (zix_ring_read(jalv->ui_to_plugin, buffer, ev.size) != ev.size) {
jalv_log(JALV_LOG_ERR, "Failed to read from UI ring buffer\n");
break;
}
@@ -551,10 +551,10 @@ jalv_apply_ui_events(Jalv* jalv, uint32_t nframes)
struct Port* const port = &jalv->ports[ev.index];
if (ev.protocol == 0) {
assert(ev.size == sizeof(float));
- port->control = *(float*)body;
+ port->control = *(float*)buffer;
} else if (ev.protocol == jalv->urids.atom_eventTransfer) {
LV2_Evbuf_Iterator e = lv2_evbuf_end(port->evbuf);
- const LV2_Atom* const atom = (const LV2_Atom*)body;
+ const LV2_Atom* const atom = (const LV2_Atom*)buffer;
lv2_evbuf_write(
&e, nframes, 0, atom->type, atom->size, LV2_ATOM_BODY_CONST(atom));
} else {