summaryrefslogtreecommitdiff
path: root/libs/ardour/mute_master.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-03-12 22:58:00 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:40 -0400
commit194b213456df43cb522651db6f27286a48eadec6 (patch)
tree5b415907ecd38ad92b79834b56105a821ce961e1 /libs/ardour/mute_master.cc
parent5531c834963726d5a35db078e17a7508f2b9d72d (diff)
add implicit mute state to MuteMaster and use when a master of a mute control is enabled/disabled. Add AutomationControl::master_changed() as a virtual method to handle ... master value changes
Diffstat (limited to 'libs/ardour/mute_master.cc')
-rw-r--r--libs/ardour/mute_master.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/mute_master.cc b/libs/ardour/mute_master.cc
index 4b83d57a9b..dc40d1fd6b 100644
--- a/libs/ardour/mute_master.cc
+++ b/libs/ardour/mute_master.cc
@@ -41,6 +41,7 @@ MuteMaster::MuteMaster (Session& s, const std::string&)
, _soloed_by_self (false)
, _soloed_by_others (false)
, _solo_ignore (false)
+ , _muted_by_others (0)
{
if (Config->get_mute_affects_pre_fader ()) {
@@ -163,6 +164,11 @@ MuteMaster::get_state()
bool
MuteMaster::muted_by_others_at (MutePoint mp) const
{
- return (!_solo_ignore && _session.soloing() && (_mute_point & mp));
+ return (!_solo_ignore && (_muted_by_others || _session.soloing()) && (_mute_point & mp));
}
+void
+MuteMaster::mod_muted_by_others (int32_t delta)
+{
+ _muted_by_others = max (0, _muted_by_others + delta);
+}