summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-10-31 22:20:24 -0400
committerDavid Robillard <d@drobilla.net>2014-11-02 02:10:24 -0500
commitbd6ba1717ef43bd4399b96a03bbb576eab55b9a2 (patch)
tree90efa347d135508c1b40611ab1037baac639cdf7 /libs/ardour
parent0178f85b05139e217c3749442d9d66a93839683c (diff)
Decouple ControlUI from port index.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/plugin.h5
-rw-r--r--libs/ardour/ladspa_plugin.cc2
-rw-r--r--libs/ardour/lv2_plugin.cc1
3 files changed, 6 insertions, 2 deletions
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index 08f242c7b4..f1a54b073a 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -95,6 +95,8 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
Plugin (const Plugin&);
virtual ~Plugin ();
+ typedef std::map<const std::string, const float> ScalePoints;
+
struct ParameterDescriptor {
ParameterDescriptor ()
@@ -131,6 +133,7 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
bool midinote; ///< only used if integer_step is also true
uint32_t key; ///< for properties
Variant::Type datatype; ///< for properties
+ boost::shared_ptr<ScalePoints> scale_points;
};
XMLNode& get_state ();
@@ -170,8 +173,6 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
virtual bool parameter_is_input(uint32_t) const = 0;
virtual bool parameter_is_output(uint32_t) const = 0;
- typedef std::map<const std::string, const float> ScalePoints;
-
virtual boost::shared_ptr<ScalePoints> get_scale_points(uint32_t /*port_index*/) const {
return boost::shared_ptr<ScalePoints>();
}
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index 8b089929b5..a33e7e0911 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -522,6 +522,8 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
desc.label = port_names()[which];
+ desc.scale_points = get_scale_points(which);
+
return 0;
}
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 4d5e063c71..ac4e213851 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -1562,6 +1562,7 @@ LV2Plugin::get_parameter_descriptor(uint32_t which, ParameterDescriptor& desc) c
}
desc.enumeration = lilv_port_has_property(_impl->plugin, port, _world.lv2_enumeration);
+ desc.scale_points = get_scale_points(which);
lilv_node_free(def);
lilv_node_free(min);