diff options
author | David Robillard <d@drobilla.net> | 2022-08-10 13:41:17 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:51:02 -0400 |
commit | c17c67cdba3045be3c4a0f65dac0039987e0d8cf (patch) | |
tree | 03b0c9c7be06892a6c2ac128ecf34008f167c9f7 | |
parent | 980e0aad7e87c08701958853792052fb78ed1900 (diff) | |
download | jalv-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 { |