diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lilv_internal.h | 1 | ||||
-rw-r--r-- | src/plugin.c | 16 | ||||
-rw-r--r-- | src/world.c | 1 |
3 files changed, 13 insertions, 5 deletions
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); |