aboutsummaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-17 09:01:46 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 19:04:31 -0500
commit4466b8525cd97f5fde392a42f2c730ab46ccb18a (patch)
tree0e019e8ad7e721ee3a29a9efdd0f921d97ba7d86 /src/state.c
parent57b544a5b036e671a516192dd2b4c2b84c37a3df (diff)
downloadjalv-4466b8525cd97f5fde392a42f2c730ab46ccb18a.tar.gz
jalv-4466b8525cd97f5fde392a42f2c730ab46ccb18a.tar.bz2
jalv-4466b8525cd97f5fde392a42f2c730ab46ccb18a.zip
Move control port buffers to a separate array
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c
index 767db0a..b550c8f 100644
--- a/src/state.c
+++ b/src/state.c
@@ -42,7 +42,7 @@ get_port_value(const char* port_symbol,
if (port && port->flow == FLOW_INPUT && port->type == TYPE_CONTROL) {
*size = sizeof(float);
*type = jalv->forge.Float;
- return &port->control;
+ return &jalv->controls_buf[port->index];
}
*size = *type = 0;
return NULL;
@@ -152,7 +152,7 @@ set_port_value(const char* port_symbol,
ZixStatus st = ZIX_STATUS_SUCCESS;
if (jalv->run_state != JALV_RUNNING) {
// Set value on port struct directly
- port->control = fvalue;
+ jalv->controls_buf[port->index] = fvalue;
} else {
// Send value to plugin (as if from UI)
st = jalv_write_control(jalv->ui_to_plugin, port->index, fvalue);