From 3f186dfe7b31633a9a1f5b389afdd31a8a249a12 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 22 Feb 2015 04:29:56 +0000 Subject: Set Jack port order metadata. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5597 a436a847-0d15-0410-975c-d299462d15a1 --- NEWS | 3 ++- src/jalv.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index c54d29d..ad51310 100644 --- a/NEWS +++ b/NEWS @@ -1,12 +1,13 @@ jalv (1.4.7) unstable; + * Set Jack port order metadata * Exit on Jack shutdown (Patch from Robin Gareus) * Report Jack latency (Patch from Robin Gareus) * Exit GUI versions on interrupt * Fix semaphore correctness issues * Use moc-qt4 if present for systems with multiple Qt versions - -- David Robillard Fri, 13 Feb 2015 21:04:32 -0500 + -- David Robillard Sat, 21 Feb 2015 23:26:19 -0500 jalv (1.4.6) stable; diff --git a/src/jalv.c b/src/jalv.c index 71b7aa0..e533ba7 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -390,10 +390,18 @@ activate_port(Jalv* jalv, #ifdef HAVE_JACK_METADATA if (port->jack_port) { + // Set port order to index + char index_str[16]; + snprintf(index_str, sizeof(index_str), "%d", port_index); + jack_set_property(jalv->jack_client, jack_port_uuid(port->jack_port), + "http://jackaudio.org/metadata/order", index_str, + "http://www.w3.org/2001/XMLSchema#integer"); + + // Set port pretty name to label LilvNode* name = lilv_port_get_name(jalv->plugin, port->lilv_port); - jack_set_property( - jalv->jack_client, jack_port_uuid(port->jack_port), - JACK_METADATA_PRETTY_NAME, lilv_node_as_string(name), NULL); + jack_set_property(jalv->jack_client, jack_port_uuid(port->jack_port), + JACK_METADATA_PRETTY_NAME, lilv_node_as_string(name), + "http://www.w3.org/2001/XMLSchema#string"); lilv_node_free(name); } #endif -- cgit v1.2.1