summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/lilv_internal.h1
-rw-r--r--src/plugin.c16
-rw-r--r--src/world.c1
4 files changed, 15 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 5306235..e531815 100644
--- a/NEWS
+++ b/NEWS
@@ -3,9 +3,10 @@ lilv (0.16.1) unstable;
* Allow lilv_state_restore() to be used without passing an instance,
for restoring port values via a callback only
* Fix unlikely memory leak in lilv_plugin_instantiate()
+ * Support denoting latency ports with lv2:designation lv2:latency
* lilvmm.hpp: Add wrappers for UI API
- -- David Robillard <d@drobilla.net> Thu, 30 May 2013 19:09:07 -0400
+ -- David Robillard <d@drobilla.net> Sun, 25 Aug 2013 11:15:19 -0400
lilv (0.16.0) stable;
diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index 49a7440..95bcee7 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -164,6 +164,7 @@ struct LilvWorldImpl {
SordNode* lv2_designation;
SordNode* lv2_extensionData;
SordNode* lv2_index;
+ SordNode* lv2_latency;
SordNode* lv2_maximum;
SordNode* lv2_minimum;
SordNode* lv2_name;
diff --git a/src/plugin.c b/src/plugin.c
index 7e33495..8ec93ff 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -594,15 +594,21 @@ lilv_plugin_has_latency(const LilvPlugin* p)
bool ret = false;
FOREACH_MATCH(ports) {
- const SordNode* port = sord_iter_get_node(ports, SORD_OBJECT);
- SordIter* reports_latency = lilv_world_query_internal(
+ const SordNode* port = sord_iter_get_node(ports, SORD_OBJECT);
+ SordIter* prop = lilv_world_query_internal(
p->world,
port,
p->world->uris.lv2_portProperty,
p->world->uris.lv2_reportsLatency);
- const bool end = sord_iter_end(reports_latency);
- sord_iter_free(reports_latency);
- if (!end) {
+ SordIter* des = lilv_world_query_internal(
+ p->world,
+ port,
+ p->world->uris.lv2_designation,
+ p->world->uris.lv2_latency);
+ const bool latent = !sord_iter_end(prop) || !sord_iter_end(des);
+ sord_iter_free(prop);
+ sord_iter_free(des);
+ if (latent) {
ret = true;
break;
}
diff --git a/src/world.c b/src/world.c
index a577bbe..e64c5d2 100644
--- a/src/world.c
+++ b/src/world.c
@@ -64,6 +64,7 @@ lilv_world_new(void)
world->uris.lv2_designation = NEW_URI(LV2_CORE__designation);
world->uris.lv2_extensionData = NEW_URI(LV2_CORE__extensionData);
world->uris.lv2_index = NEW_URI(LV2_CORE__index);
+ world->uris.lv2_latency = NEW_URI(LV2_CORE__latency);
world->uris.lv2_maximum = NEW_URI(LV2_CORE__maximum);
world->uris.lv2_minimum = NEW_URI(LV2_CORE__minimum);
world->uris.lv2_name = NEW_URI(LV2_CORE__name);