aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/patcher.edc25
-rw-r--r--lib/synthpod_app.c37
2 files changed, 40 insertions, 22 deletions
diff --git a/data/patcher.edc b/data/patcher.edc
index daeadd28..727589fe 100644
--- a/data/patcher.edc
+++ b/data/patcher.edc
@@ -36,16 +36,6 @@ group {
fixed: 1 1;
color: 255 255 255 0;
}
- description {
- state: "default" 0.5;
- inherit: "default" 0.0;
- color: 0 0 0 48;
- }
- description {
- state: "default" 1.0;
- inherit: "default" 0.0;
- color: 0 0 0 96;
- }
}
part {
@@ -220,20 +210,23 @@ group {
program {
signal: "direct";
source: PATCHER_UI;
- action: STATE_SET "default" 0.5;
- target: "bg";
+ action: STATE_SET "default" 0.0;
+ target: "grid.horizontal";
+ target: "grid.vertical";
}
program {
signal: "indirect";
source: PATCHER_UI;
- action: STATE_SET "default" 1.0;
- target: "bg";
+ action: STATE_SET "default" 0.0;
+ target: "grid.horizontal";
+ target: "grid.vertical";
}
program {
signal: "feedback";
source: PATCHER_UI;
- action: STATE_SET "default" 0.0;
- target: "bg";
+ action: STATE_SET "default" 1.0;
+ target: "grid.horizontal";
+ target: "grid.vertical";
}
program {
diff --git a/lib/synthpod_app.c b/lib/synthpod_app.c
index 0340e66e..4fd58fe9 100644
--- a/lib/synthpod_app.c
+++ b/lib/synthpod_app.c
@@ -1941,19 +1941,18 @@ sp_app_run_pre(sp_app_t *app, uint32_t nsamples)
else if(mod->worker.iface && mod->worker.iface->end_run)
mod->worker.iface->end_run(mod->handle);
- // clear atom sequence input / output buffers where needed
+ // clear atom sequence input buffers
for(int i=0; i<mod->num_ports; i++)
{
port_t *port = &mod->ports[i];
if( (port->type == PORT_TYPE_ATOM)
- && (port->buffer_type == PORT_BUFFER_TYPE_SEQUENCE) )
+ && (port->buffer_type == PORT_BUFFER_TYPE_SEQUENCE)
+ && (port->direction == PORT_DIRECTION_INPUT) )
{
LV2_Atom_Sequence *seq = port->buf;
seq->atom.type = app->regs.port.sequence.urid;
- seq->atom.size = port->direction == PORT_DIRECTION_INPUT
- ? sizeof(LV2_Atom_Sequence_Body) // empty sequence
- : app->driver->seq_size; // capacity
+ seq->atom.size = sizeof(LV2_Atom_Sequence_Body); // empty sequence
}
}
}
@@ -2101,6 +2100,21 @@ sp_app_run_post(sp_app_t *app, uint32_t nsamples)
}
}
+ // clear atom sequence output buffers
+ for(int i=0; i<mod->num_ports; i++)
+ {
+ port_t *port = &mod->ports[i];
+
+ if( (port->type == PORT_TYPE_ATOM)
+ && (port->buffer_type == PORT_BUFFER_TYPE_SEQUENCE)
+ && (port->direction == PORT_DIRECTION_OUTPUT) )
+ {
+ LV2_Atom_Sequence *seq = port->buf;
+ seq->atom.type = app->regs.port.sequence.urid;
+ seq->atom.size = port->size;
+ }
+ }
+
// run plugin
lilv_instance_run(mod->inst, nsamples);
@@ -2652,6 +2666,18 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
lilv_state_free(state);
free(path);
+ }
+
+ // iterate over mods and their ports
+ for(cJSON *mod_json = cJSON_GetObjectItem(root_json, "items")->child;
+ mod_json;
+ mod_json = mod_json->next)
+ {
+ u_id_t mod_uid = cJSON_GetObjectItem(mod_json, "uid")->valueint;
+
+ mod_t *mod = _sp_app_mod_get(app, mod_uid);
+ if(!mod)
+ continue;
// iterate over ports
for(cJSON *port_json = cJSON_GetObjectItem(mod_json, "ports")->child;
@@ -2671,7 +2697,6 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
port->selected = cJSON_GetObjectItem(port_json, "selected")->type == cJSON_True;
- // TODO cannot handle recursive connections, needs a second loop
for(cJSON *source_json = cJSON_GetObjectItem(port_json, "sources")->child;
source_json;
source_json = source_json->next)