aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-15 11:56:18 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 18:59:59 -0500
commita584a1f33002f9fefda29842f0ec5f58316252af (patch)
tree7fa5466b3ea0657986e7c8caeb629af92e553cf1 /src/jalv.c
parent7ab8a8f8771aed943e1e154c7a7c7040f7e7be3b (diff)
downloadjalv-a584a1f33002f9fefda29842f0ec5f58316252af.tar.gz
jalv-a584a1f33002f9fefda29842f0ec5f58316252af.tar.bz2
jalv-a584a1f33002f9fefda29842f0ec5f58316252af.zip
Avoid querying the lilv model in the process callback
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jalv.c b/src/jalv.c
index bb40963..23a3698 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -210,6 +210,7 @@ create_port(Jalv* jalv, uint32_t port_index, float default_value)
die("Mandatory port has unknown data type");
}
+ // Set buffer size
LilvNode* min_size =
lilv_port_get(jalv->plugin, port->lilv_port, jalv->nodes.rsz_minimumSize);
if (min_size && lilv_node_is_int(min_size)) {
@@ -218,6 +219,13 @@ create_port(Jalv* jalv, uint32_t port_index, float default_value)
MAX(jalv->opts.buffer_size, port->buf_size * N_BUFFER_CYCLES);
}
lilv_node_free(min_size);
+
+ // Set reports_latency flag
+ if (port->flow == FLOW_OUTPUT && port->type == TYPE_CONTROL &&
+ lilv_port_has_property(
+ jalv->plugin, port->lilv_port, jalv->nodes.lv2_reportsLatency)) {
+ port->reports_latency = true;
+ }
}
/// Create port structures from data (via create_port()) for all ports