diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-16 19:05:27 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-16 19:05:27 +0000 |
commit | 72d17d326e5ffe744ac89570410c38712ab7f79e (patch) | |
tree | 1f39db60171f9805c7b069eedb8e56148bd3b257 /libs/surfaces/mackie/controls.cc | |
parent | a2897ecef6da6a458aa1de8c2d9973a1e809dca2 (diff) |
MCP: a fistful of changes
git-svn-id: svn://localhost/ardour2/branches/3.0@11987 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/controls.cc')
-rw-r--r-- | libs/surfaces/mackie/controls.cc | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/libs/surfaces/mackie/controls.cc b/libs/surfaces/mackie/controls.cc index 24b59fd744..29d8d165ce 100644 --- a/libs/surfaces/mackie/controls.cc +++ b/libs/surfaces/mackie/controls.cc @@ -84,56 +84,32 @@ ostream & Mackie::operator << (ostream & os, const Mackie::Control & control) } void -Control::set_normal_control (boost::shared_ptr<AutomationControl> ac) +Control::set_control (boost::shared_ptr<AutomationControl> ac) { normal_ac = ac; } void -Control::set_modified_control (boost::shared_ptr<AutomationControl> ac) +Control::set_value (float val) { - modified_ac = ac; -} - -void -Control::set_value (float val, bool modified) -{ - if (modified && modified_ac) { - modified_ac->set_value (modified_ac->interface_to_internal (val)); - } else if (normal_ac) { - normal_ac->set_value (normal_ac->interface_to_internal (val)); - } + normal_ac->set_value (normal_ac->interface_to_internal (val)); } float -Control::get_value (bool modified) +Control::get_value () { - if (modified && modified_ac) { - return modified_ac->internal_to_interface (modified_ac->get_value()); - } else if (normal_ac) { - return normal_ac->internal_to_interface (normal_ac->get_value()); - } - - return 0.0; + return normal_ac->internal_to_interface (normal_ac->get_value()); } void -Control::start_touch (double when, bool modified) +Control::start_touch (double when) { - if (modified && modified_ac) { - return modified_ac->start_touch (when); - } else if (normal_ac) { - return normal_ac->start_touch (when); - } + return normal_ac->start_touch (when); } void -Control::stop_touch (double when, bool mark, bool modified) +Control::stop_touch (double when, bool mark) { - if (modified && modified_ac) { - return modified_ac->stop_touch (when, mark); - } else if (normal_ac) { - return normal_ac->stop_touch (when, mark); - } + return normal_ac->stop_touch (when, mark); } |