summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-28 18:13:00 +0000
committerDavid Robillard <d@drobilla.net>2012-02-28 18:13:00 +0000
commitfd8ecd85b21e104e669017a04076a60162420a53 (patch)
tree9132fd8c68dd44a1ba9906b44ca5a545f35fbd0c /src/plugin.c
parentd175e2de6d3b51dfa1af5ea95bdad6e8c97df795 (diff)
downloadlilv-fd8ecd85b21e104e669017a04076a60162420a53.tar.gz
lilv-fd8ecd85b21e104e669017a04076a60162420a53.tar.bz2
lilv-fd8ecd85b21e104e669017a04076a60162420a53.zip
Update for latest lv2core.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4004 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugin.c b/src/plugin.c
index df113a0..fb396df 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -611,19 +611,22 @@ lilv_plugin_get_port_by_property(const LilvPlugin* plugin,
LILV_API
LilvPort*
-lilv_plugin_get_port_by_relation(const LilvPlugin* plugin,
- const LilvNode* relation)
+lilv_plugin_get_port_by_parameter(const LilvPlugin* plugin,
+ const LilvNode* port_class,
+ const LilvNode* parameter)
{
+ LilvWorld* world = plugin->world;
lilv_plugin_load_ports_if_necessary(plugin);
for (uint32_t i = 0; i < plugin->num_ports; ++i) {
LilvPort* port = plugin->ports[i];
SordIter* iter = lilv_world_query_internal(
- plugin->world,
+ world,
port->node,
- plugin->world->uris.lv2_relation,
- relation->val.uri_val);
+ world->uris.lv2_isParameter,
+ parameter->val.uri_val);
- const bool found = !lilv_matches_end(iter);
+ const bool found = !lilv_matches_end(iter) &&
+ lilv_port_is_a(plugin, port, port_class);
lilv_match_end(iter);
if (found) {