diff options
Diffstat (limited to 'src/jalv_console.c')
-rw-r--r-- | src/jalv_console.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/jalv_console.c b/src/jalv_console.c index 1f97572..fe92cd7 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -1,6 +1,7 @@ // Copyright 2007-2024 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC +#include "comm.h" #include "control.h" #include "frontend.h" #include "jalv.h" @@ -200,7 +201,7 @@ print_controls(const Jalv* const jalv, const bool writable, const bool readable) jalv_log(JALV_LOG_INFO, "%s = %f\n", lilv_node_as_string(control->symbol), - jalv->process.controls_buf[control->index]); + jalv->process.controls_buf[control->id.index]); } } @@ -249,14 +250,14 @@ jalv_process_command(Jalv* jalv, const char* cmd) print_controls(jalv, false, true); } else if (sscanf(cmd, "set %u %f", &index, &value) == 2) { if (index < jalv->num_ports) { - jalv->process.controls_buf[index] = value; + jalv_write_control(jalv->process.ui_to_plugin, index, value); print_control_port(jalv, &jalv->ports[index], value); } else { fprintf(stderr, "error: port index out of range\n"); } } else if (sscanf(cmd, "set %1023[a-zA-Z0-9_] %f", sym, &value) == 2 || sscanf(cmd, "%1023[a-zA-Z0-9_] = %f", sym, &value) == 2) { - JalvPort* const port = jalv_port_by_symbol(jalv, sym); + const JalvPort* const port = jalv_port_by_symbol(jalv, sym); if (port) { jalv->process.controls_buf[port->index] = value; print_control_port(jalv, port, value); @@ -342,9 +343,9 @@ jalv_frontend_open(Jalv* jalv) for (size_t i = 0; i < jalv->controls.n_controls; ++i) { ControlID* control = jalv->controls.controls[i]; if (control->type == PORT && control->is_writable) { - const JalvPort* const port = &jalv->ports[control->index]; + const JalvPort* const port = &jalv->ports[control->id.index]; print_control_port( - jalv, port, jalv->process.controls_buf[control->index]); + jalv, port, jalv->process.controls_buf[control->id.index]); } } |