summaryrefslogtreecommitdiffstats
path: root/src/libs/client/NodeModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-25 06:55:57 +0000
committerDavid Robillard <d@drobilla.net>2008-01-25 06:55:57 +0000
commitdf8ee18c0139f889bf7c697713a2205364845464 (patch)
tree2d3d2389504676b194fcb47a9ed3e7b1da8f94c4 /src/libs/client/NodeModel.cpp
parentf3f08e248a96f2a6d75d4fc6ee3dc34985805e58 (diff)
downloadingen-df8ee18c0139f889bf7c697713a2205364845464.tar.gz
ingen-df8ee18c0139f889bf7c697713a2205364845464.tar.bz2
ingen-df8ee18c0139f889bf7c697713a2205364845464.zip
Overhaul SLV2 API to return/take SLV2Value (instead of strings or primitives) wherever possible.
Make 'index' a fundemental property of ingen ports. git-svn-id: http://svn.drobilla.net/lad/ingen@1113 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/NodeModel.cpp')
-rw-r--r--src/libs/client/NodeModel.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index b429d356..2f8af584 100644
--- a/src/libs/client/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
@@ -156,16 +156,16 @@ NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max)
// Plugin value first
if (_plugin && _plugin->type() == PluginModel::LV2) {
Glib::Mutex::Lock(PluginModel::rdf_world()->mutex());
-
- min = slv2_port_get_minimum_value(
- _plugin->slv2_plugin(),
- slv2_plugin_get_port_by_symbol(_plugin->slv2_plugin(),
- port->path().name().c_str()));
-
- max = slv2_port_get_maximum_value(
- _plugin->slv2_plugin(),
- slv2_plugin_get_port_by_symbol(_plugin->slv2_plugin(),
- port->path().name().c_str()));
+
+ SLV2Value min_val, max_val;
+ slv2_port_get_range(_plugin->slv2_plugin(),
+ _plugin->slv2_port(port->index()),
+ NULL, &min_val, &max_val);
+
+ if (min_val)
+ min = slv2_value_as_float(min_val);
+ if (max_val)
+ max = slv2_value_as_float(max_val);
}
#endif