diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 13:40:41 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:12:23 +0200 |
commit | 36e32e564126e4587e3c2bee829c58876e65d285 (patch) | |
tree | cd86f80407311da8b32f5fb68d1c2cce4f162e19 /libs/ardour | |
parent | cb48bb0e1ccdd8a8324e53e716b2058c2ef3c297 (diff) |
Remove separate ControlList min/max/default, use ParameterDescriptor.
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/automation_list.cc | 15 | ||||
-rw-r--r-- | libs/ardour/gain_control.cc | 2 | ||||
-rw-r--r-- | libs/ardour/plugin_insert.cc | 29 |
3 files changed, 0 insertions, 46 deletions
diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc index fbeb98fa26..f456ac210b 100644 --- a/libs/ardour/automation_list.cc +++ b/libs/ardour/automation_list.cc @@ -321,9 +321,6 @@ AutomationList::state (bool full) root->set_property ("automation-id", EventTypeMap::instance().to_symbol(_parameter)); root->set_property ("id", id()); - root->set_property ("default", _default_value); - root->set_property ("min-yval", _min_yval); - root->set_property ("max-yval", _max_yval); root->set_property ("interpolation-style", _interpolation); if (full) { @@ -495,10 +492,6 @@ AutomationList::set_state (const XMLNode& node, int version) _interpolation = Linear; } - if (!node.get_property (X_("default"), _default_value)) { - _default_value = 0.0; - } - if (node.get_property (X_("state"), _state)) { if (_state == Write) { _state = Off; @@ -508,14 +501,6 @@ AutomationList::set_state (const XMLNode& node, int version) _state = Off; } - if (!node.get_property (X_("min-yval"), _min_yval)) { - _min_yval = FLT_MIN; - } - - if (!node.get_property (X_("max-yval"), _max_yval)) { - _max_yval = FLT_MAX; - } - bool have_events = false; for (niter = nlist.begin(); niter != nlist.end(); ++niter) { diff --git a/libs/ardour/gain_control.cc b/libs/ardour/gain_control.cc index 35f666bdf1..36a161059c 100644 --- a/libs/ardour/gain_control.cc +++ b/libs/ardour/gain_control.cc @@ -40,8 +40,6 @@ GainControl::GainControl (Session& session, const Evoral::Parameter ¶m, boos param.type() == GainAutomation ? X_("gaincontrol") : X_("trimcontrol"), Controllable::GainLike) { - alist()->reset_default (1.0); - lower_db = accurate_coefficient_to_dB (_desc.lower); range_db = accurate_coefficient_to_dB (_desc.upper) - lower_db; } diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index ece0fbe40d..6dbfcc6a2b 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -2767,30 +2767,6 @@ PluginInsert::set_parameter_state_2X (const XMLNode& node, int version) if (c && c->alist()) { if (!child->children().empty()) { c->alist()->set_state (*child->children().front(), version); - - /* In some cases 2.X saves lists with min_yval and max_yval - being FLT_MIN and FLT_MAX respectively. This causes problems - in A3 because these min/max values are used to compute - where GUI control points should be drawn. If we see such - values, `correct' them to the min/max of the appropriate - parameter. - */ - - float min_y = c->alist()->get_min_y (); - float max_y = c->alist()->get_max_y (); - - ParameterDescriptor desc; - _plugins.front()->get_parameter_descriptor (port_id, desc); - - if (min_y == FLT_MIN) { - min_y = desc.lower; - } - - if (max_y == FLT_MAX) { - max_y = desc.upper; - } - - c->alist()->set_yrange (min_y, max_y); } } else { error << string_compose (_("PluginInsert: automatable control %1 not found - ignored"), port_id) << endmsg; @@ -2855,7 +2831,6 @@ PluginInsert::PluginControl::PluginControl (PluginInsert* p, , _plugin (p) { if (alist()) { - alist()->reset_default (desc.normal); if (desc.toggled) { list->set_interpolation(Evoral::ControlList::Discrete); } @@ -2922,10 +2897,6 @@ PluginInsert::PluginPropertyControl::PluginPropertyControl (PluginInsert* : AutomationControl (p->session(), param, desc, list) , _plugin (p) { - if (alist()) { - alist()->set_yrange (desc.lower, desc.upper); - alist()->reset_default (desc.normal); - } } void |