diff options
Diffstat (limited to 'src/portaudio.c')
-rw-r--r-- | src/portaudio.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/portaudio.c b/src/portaudio.c index c15ed07..f7b7e45 100644 --- a/src/portaudio.c +++ b/src/portaudio.c @@ -80,15 +80,7 @@ pa_process_cb(const void* inputs, } } else if (send_ui_updates && port->flow == FLOW_OUTPUT && port->type == TYPE_CONTROL) { - char buf[sizeof(ControlChange) + sizeof(float)]; - ControlChange* ev = (ControlChange*)buf; - ev->index = p; - ev->protocol = 0; - ev->size = sizeof(float); - *(float*)(ev + 1) = port->control; - if (zix_ring_write(jalv->plugin_to_ui, buf, sizeof(buf)) < sizeof(buf)) { - jalv_log(JALV_LOG_ERR, "Plugin => UI buffer overflow\n"); - } + jalv_write_control(jalv, jalv->plugin_to_ui, p, port->control); } } |