diff options
author | Robin Gareus <robin@gareus.org> | 2016-06-08 15:34:30 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-06-08 15:39:04 +0200 |
commit | a223b96725c68a4e41c9f2f5675756c274730889 (patch) | |
tree | a4b65182c127c21bb4faa250a3101b00faecb6dd /libs/ardour/mute_control.cc | |
parent | fce6ac0ef6cbf410715a02b59d9d41d3290710a0 (diff) |
fix mute automation for busses & consolidate code.
Diffstat (limited to 'libs/ardour/mute_control.cc')
-rw-r--r-- | libs/ardour/mute_control.cc | 17 |
1 files changed, 17 insertions, 0 deletions
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 + } +} |