diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/jack.c | 3 | ||||
-rw-r--r-- | src/jalv.c | 8 | ||||
-rw-r--r-- | src/port.h | 19 |
4 files changed, 21 insertions, 12 deletions
@@ -8,6 +8,7 @@ jalv (1.6.9) unstable; urgency=medium * Clean up command line help output * Fix clashing command line options * Fix minor memory leaks + * Reduce Jack process callback overhead * Remove Gtk2 interface * Replace use of deprecated Gtk interfaces * Switch to external zix dependency @@ -15,7 +16,7 @@ jalv (1.6.9) unstable; urgency=medium * Use fewer platform-specific APIs * Use portable zix filesystem API - -- David Robillard <d@drobilla.net> Thu, 14 Nov 2024 18:26:43 +0000 + -- David Robillard <d@drobilla.net> Fri, 15 Nov 2024 16:53:31 +0000 jalv (1.6.8) stable; urgency=medium @@ -202,8 +202,7 @@ jack_process_cb(jack_nframes_t nframes, void* data) for (uint32_t p = 0; p < jalv->num_ports; ++p) { struct Port* const port = &jalv->ports[p]; 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) { if (jalv->plugin_latency != port->control) { jalv->plugin_latency = port->control; jack_recompute_total_latencies(client); @@ -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 @@ -19,15 +19,16 @@ enum PortFlow { FLOW_UNKNOWN, FLOW_INPUT, FLOW_OUTPUT }; enum PortType { TYPE_UNKNOWN, TYPE_CONTROL, TYPE_AUDIO, TYPE_EVENT, TYPE_CV }; struct Port { - const LilvPort* lilv_port; ///< LV2 port - enum PortType type; ///< Data type - enum PortFlow flow; ///< Data flow direction - void* sys_port; ///< For audio/MIDI ports, otherwise NULL - LV2_Evbuf* evbuf; ///< For MIDI ports, otherwise NULL - void* widget; ///< Control widget, if applicable - size_t buf_size; ///< Custom buffer size, or 0 - uint32_t index; ///< Port index - float control; ///< For control ports, otherwise 0.0f + const LilvPort* lilv_port; ///< LV2 port + enum PortType type; ///< Data type + enum PortFlow flow; ///< Data flow direction + void* sys_port; ///< For audio/MIDI ports, otherwise NULL + LV2_Evbuf* evbuf; ///< For MIDI ports, otherwise NULL + void* widget; ///< Control widget, if applicable + size_t buf_size; ///< Custom buffer size, or 0 + uint32_t index; ///< Port index + float control; ///< For control ports, otherwise 0.0f + bool reports_latency; ///< For control port outputs }; JALV_END_DECLS |