summaryrefslogtreecommitdiff
path: root/libs/ardour/track.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-10-21 22:31:30 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-21 22:31:35 -0400
commit8d3a8ca9136c3fb8a8bd24dd5d99c8e2e76699bd (patch)
tree86e9cb3829a6a49647c57ae6a9a2d0b15c665a38 /libs/ardour/track.cc
parent6ca3a1593e1467e057637e5ba863ca613e576eb8 (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/track.cc')
-rw-r--r--libs/ardour/track.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index e99d07f047..c4c82808bd 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -192,6 +192,14 @@ Track::RecEnableControl::RecEnableControl (boost::shared_ptr<Track> t)
void
Track::RecEnableControl::set_value (double val)
{
+ if (writable()) {
+ set_value_unchecked (val);
+ }
+}
+
+void
+Track::RecEnableControl::set_value_unchecked (double val)
+{
boost::shared_ptr<Track> t = track.lock ();
if (!t) {
return;