#include "ardour/session.h"
#include "ardour/mute_control.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace std;
MuteControl::get_value () const
{
if (slaved ()) {
- return get_masters_value ();
+ return muted_by_self() || get_masters_value ();
}
if (_list && boost::dynamic_pointer_cast<AutomationList>(_list)->automation_playback()) {
return AutomationControl::get_value();
}
- return muted() ? 1.0 : 0.0;
+ return muted();
}
void
return get_masters_value ();
}
+bool
+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
+ }
+}