summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/DeprecatedLoader.cpp4
-rw-r--r--src/client/NodeModel.cpp19
-rw-r--r--src/client/NodeModel.hpp1
3 files changed, 19 insertions, 5 deletions
diff --git a/src/client/DeprecatedLoader.cpp b/src/client/DeprecatedLoader.cpp
index 0b3243d1..32dd8059 100644
--- a/src/client/DeprecatedLoader.cpp
+++ b/src/client/DeprecatedLoader.cpp
@@ -152,9 +152,9 @@ DeprecatedLoader::add_variable(GraphObject::Properties& data, string old_key, st
{
string key = "";
if (old_key == "module-x")
- key = "ingen-ui:canvas-x";
+ key = "ingenui:canvas-x";
else if (old_key == "module-y")
- key = "ingen-ui:canvas-y";
+ key = "ingenui:canvas-y";
if (key != "") {
// FIXME: should this overwrite existing values?
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp
index 07bdccf8..ea419e3a 100644
--- a/src/client/NodeModel.cpp
+++ b/src/client/NodeModel.cpp
@@ -170,12 +170,14 @@ NodeModel::port(uint32_t index) const
void
-NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) const
+NodeModel::default_port_value_range(SharedPtr<PortModel> port, float& min, float& max) const
{
- assert(port->parent().get() == this);
+ // Default control values
+ min = 0.0;
+ max = 1.0;
+ // Get range from client-side LV2 data
#ifdef HAVE_SLV2
- // Plugin value first
if (_plugin && _plugin->type() == PluginModel::LV2) {
if (!_min_values) {
@@ -196,6 +198,17 @@ NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) c
}
#endif
+ // TODO: LADSPA support
+}
+
+
+void
+NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) const
+{
+ assert(port->parent().get() == this);
+
+ default_port_value_range(port, min, max);
+
// Possibly overriden
const Atom& min_atom = port->get_property("lv2:minimum");
const Atom& max_atom = port->get_property("lv2:maximum");
diff --git a/src/client/NodeModel.hpp b/src/client/NodeModel.hpp
index b1dbb616..3c150700 100644
--- a/src/client/NodeModel.hpp
+++ b/src/client/NodeModel.hpp
@@ -60,6 +60,7 @@ public:
uint32_t num_ports() const { return _ports.size(); }
const Ports& ports() const { return _ports; }
+ void default_port_value_range(SharedPtr<PortModel> port, float& min, float& max) const;
void port_value_range(SharedPtr<PortModel> port, float& min, float& max) const;
// Signals