aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jalv.c6
-rw-r--r--src/state.c11
2 files changed, 9 insertions, 8 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 9f4784e..caa0ece 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -560,8 +560,7 @@ jack_session_cb(jack_session_event_t* event, void* arg)
event->command_line = malloc(MAX_CMD_LEN);
snprintf(event->command_line, MAX_CMD_LEN, "%s -u %s -l \"${SESSION_DIR}\"",
jalv->prog_name,
- event->client_uuid,
- event->session_dir);
+ event->client_uuid);
switch (event->type) {
case JackSessionSave:
@@ -654,9 +653,6 @@ jalv_ui_write(SuilController controller,
const void* buffer)
{
Jalv* const jalv = (Jalv*)controller;
- if (!jalv->has_ui) {
- return;
- }
if (protocol != 0 && protocol != jalv->urids.atom_eventTransfer) {
fprintf(stderr, "UI write with unsupported protocol %d (%s)\n",
diff --git a/src/state.c b/src/state.c
index 8975df9..166cd0e 100644
--- a/src/state.c
+++ b/src/state.c
@@ -147,11 +147,16 @@ set_port_value(const char* port_symbol,
return;
}
- // Send value to plugin
- jalv_ui_write(jalv, port->index, sizeof(fvalue), 0, &fvalue);
+ if (jalv->play_state != JALV_RUNNING) {
+ // Set value on port struct directly
+ port->control = fvalue;
+ } else {
+ // Send value to running plugin
+ jalv_ui_write(jalv, port->index, sizeof(fvalue), 0, &fvalue);
+ }
- // Update UI
if (jalv->has_ui) {
+ // Update UI
char buf[sizeof(ControlChange) + sizeof(fvalue)];
ControlChange* ev = (ControlChange*)buf;
ev->index = port->index;