+
+void
+MuteControl::automation_run (samplepos_t start, pframes_t len)
+{
+ boolean_automation_run (start, len);
+
+ bool valid = false;
+ bool mute = false;
+
+ if (list() && automation_playback()) {
+ mute = list()->rt_safe_eval (start, valid) >= 0.5;
+ }
+
+ if (!valid) {
+ return;
+ }
+
+ if (muted_by_masters ()) {
+ /* already muted, no need to check further,
+ * except we need to up update implicit/explict mute
+ */
+ if (muted_by_self () != mute) {
+ set_value_unchecked (mute ? 1. : 0.);
+ Changed (false, Controllable::NoGroup); /* EMIT SIGNAL */
+ }
+ return;
+ }
+
+ if (mute && !muted()) {
+ set_value_unchecked (1.0); // mute
+ Changed (false, Controllable::NoGroup); /* EMIT SIGNAL */
+ } else if (!mute && muted()) {
+ set_value_unchecked (0.0); // unmute
+ Changed (false, Controllable::NoGroup); /* EMIT SIGNAL */
+ }
+}