diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-21 22:31:30 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-21 22:31:35 -0400 |
commit | 8d3a8ca9136c3fb8a8bd24dd5d99c8e2e76699bd (patch) | |
tree | 86e9cb3829a6a49647c57ae6a9a2d0b15c665a38 /libs/ardour/route.cc | |
parent | 6ca3a1593e1467e057637e5ba863ca613e576eb8 (diff) |
Add AutomationControl::set_value_unchecked() and AutomationControl::writable() and use them.
Classes derived from AutomationControl now check ::writable() in their ::set_value() methods to ensure that they
do not attempt to overwrite data sent to them while automation playback is underway.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 60f4908768..56d1f69ebe 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -3848,6 +3848,14 @@ Route::SoloControllable::SoloControllable (std::string name, boost::shared_ptr<R void Route::SoloControllable::set_value (double val) { + if (writable()) { + set_value_unchecked (val); + } +} + +void +Route::SoloControllable::set_value_unchecked (double val) +{ const bool bval = ((val >= 0.5) ? true : false); boost::shared_ptr<RouteList> rl (new RouteList); @@ -3921,6 +3929,14 @@ Route::MuteControllable::set_superficial_value(bool muted) void Route::MuteControllable::set_value (double val) { + if (writable()) { + set_value_unchecked (val); + } +} + +void +Route::MuteControllable::set_value_unchecked (double val) +{ const bool bval = ((val >= 0.5) ? true : false); boost::shared_ptr<Route> r = _route.lock (); |