summaryrefslogtreecommitdiff
path: root/libs/ardour/mute_master.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-19 14:32:49 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-19 14:32:49 +0000
commit6ad69a206ca325e9e50eff4f8f2088170b468f00 (patch)
tree24c716755fa2f36ccc68100cabf53a5ae4be4b7d /libs/ardour/mute_master.cc
parente258b2622a4386b405c2216d79b34887c3ed55bf (diff)
When muting a route because another is soloed, take
into account the muting options (pre-fader/post-fader etc.) for the muted route. git-svn-id: svn://localhost/ardour2/branches/3.0@7119 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/mute_master.cc')
-rw-r--r--libs/ardour/mute_master.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/libs/ardour/mute_master.cc b/libs/ardour/mute_master.cc
index bc3cca787a..9a95e70a11 100644
--- a/libs/ardour/mute_master.cc
+++ b/libs/ardour/mute_master.cc
@@ -38,7 +38,7 @@ const MuteMaster::MutePoint MuteMaster::AllPoints = MutePoint (MuteMaster::PreFa
MuteMaster::MuteMaster (Session& s, const std::string&)
: SessionHandleRef (s)
, _mute_point (AllPoints)
- , _muted (false)
+ , _muted_by_self (false)
, _soloed (false)
, _solo_ignore (false)
{
@@ -76,22 +76,22 @@ MuteMaster::mute_gain_at (MutePoint mp) const
if (Config->get_solo_mute_override()) {
if (_soloed) {
gain = 1.0;
- } else if (muted_at (mp)) { // self-muted
+ } else if (muted_by_self_at (mp)) {
gain = Config->get_solo_mute_gain ();
} else {
- if (!_solo_ignore && _session.soloing()) {
+ if (muted_by_others_at (mp)) {
gain = 0.0;
} else {
gain = 1.0;
}
}
} else {
- if (muted_at (mp)) { // self-muted
+ if (muted_by_self_at (mp)) {
gain = Config->get_solo_mute_gain ();
} else if (_soloed) {
gain = 1.0;
} else {
- if (!_solo_ignore && _session.soloing()) {
+ if (muted_by_others_at (mp)) {
gain = 0.0;
} else {
gain = 1.0;
@@ -133,9 +133,9 @@ MuteMaster::set_state (const XMLNode& node, int /*version*/)
}
if ((prop = node.property ("muted")) != 0) {
- _muted = string_is_affirmative (prop->value());
+ _muted_by_self = string_is_affirmative (prop->value());
} else {
- _muted = (_mute_point != MutePoint (0));
+ _muted_by_self = (_mute_point != MutePoint (0));
}
return 0;
@@ -146,6 +146,13 @@ MuteMaster::get_state()
{
XMLNode* node = new XMLNode (X_("MuteMaster"));
node->add_property ("mute-point", enum_2_string (_mute_point));
- node->add_property ("muted", (_muted ? X_("yes") : X_("no")));
+ node->add_property ("muted", (_muted_by_self ? X_("yes") : X_("no")));
return *node;
}
+
+bool
+MuteMaster::muted_by_others_at (MutePoint mp) const
+{
+ return (!_solo_ignore && _session.soloing() && (_mute_point & mp));
+}
+