diff options
author | David Robillard <d@drobilla.net> | 2024-11-17 09:01:46 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-24 19:04:31 -0500 |
commit | 4466b8525cd97f5fde392a42f2c730ab46ccb18a (patch) | |
tree | 0e019e8ad7e721ee3a29a9efdd0f921d97ba7d86 /src/jack.c | |
parent | 57b544a5b036e671a516192dd2b4c2b84c37a3df (diff) | |
download | jalv-4466b8525cd97f5fde392a42f2c730ab46ccb18a.tar.gz jalv-4466b8525cd97f5fde392a42f2c730ab46ccb18a.tar.bz2 jalv-4466b8525cd97f5fde392a42f2c730ab46ccb18a.zip |
Move control port buffers to a separate array
Diffstat (limited to 'src/jack.c')
-rw-r--r-- | src/jack.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -217,7 +217,7 @@ jack_process_cb(jack_nframes_t nframes, void* data) if (port->flow == FLOW_OUTPUT && port->type == TYPE_CONTROL && port->reports_latency) { // Get the latency in frames from the control output truncated to integer - const float value = port->control; + const float value = jalv->controls_buf[p]; const uint32_t frames = (value >= 0.0f && value <= max_latency) ? (uint32_t)value : 0U; @@ -260,7 +260,7 @@ jack_process_cb(jack_nframes_t nframes, void* data) } } else if (send_ui_updates && port->flow == FLOW_OUTPUT && port->type == TYPE_CONTROL) { - jalv_write_control(jalv->plugin_to_ui, p, port->control); + jalv_write_control(jalv->plugin_to_ui, p, jalv->controls_buf[p]); } } @@ -432,7 +432,8 @@ jalv_backend_activate_port(Jalv* jalv, uint32_t port_index) case TYPE_UNKNOWN: break; case TYPE_CONTROL: - lilv_instance_connect_port(jalv->instance, port_index, &port->control); + lilv_instance_connect_port( + jalv->instance, port_index, &jalv->controls_buf[port_index]); break; case TYPE_AUDIO: port->sys_port = jack_port_register( |