From a223b96725c68a4e41c9f2f5675756c274730889 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 8 Jun 2016 15:34:30 +0200 Subject: fix mute automation for busses & consolidate code. --- libs/ardour/mute_control.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libs/ardour/mute_control.cc') diff --git a/libs/ardour/mute_control.cc b/libs/ardour/mute_control.cc index 0870732c58..7e9815f326 100644 --- a/libs/ardour/mute_control.cc +++ b/libs/ardour/mute_control.cc @@ -175,3 +175,20 @@ MuteControl::muted_by_others_soloing () const { return _muteable.muted_by_others_soloing (); } + +void +MuteControl::automation_run (framepos_t start, pframes_t) +{ + if (!list() || !automation_playback()) { + return; + } + + bool valid = false; + const float mute = list()->rt_safe_eval (start, valid); + + if (mute >= 0.5 && !muted()) { + set_value_unchecked (1.0); // mute + } else if (mute < 0.5 && muted ()) { + set_value_unchecked (0.0); // unmute + } +} -- cgit v1.2.3