From 8d3a8ca9136c3fb8a8bd24dd5d99c8e2e76699bd Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 21 Oct 2015 22:31:30 -0400 Subject: 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. --- libs/ardour/track.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/ardour/track.cc') 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 @@ -191,6 +191,14 @@ Track::RecEnableControl::RecEnableControl (boost::shared_ptr 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 t = track.lock (); if (!t) { -- cgit v1.2.3