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
This commit is contained in:
@@ -47,17 +47,13 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
|
||||
MuteMaster (Session& s, const std::string& name);
|
||||
~MuteMaster() {}
|
||||
|
||||
bool muted() const { return _muted && (_mute_point != MutePoint (0)); }
|
||||
bool muted_at (MutePoint mp) const { return _muted && (_mute_point & mp); }
|
||||
|
||||
bool muted_pre_fader() const { return muted_at (PreFader); }
|
||||
bool muted_post_fader() const { return muted_at (PostFader); }
|
||||
bool muted_listen() const { return muted_at (Listen); }
|
||||
bool muted_main () const { return muted_at (Main); }
|
||||
bool muted_by_self () const { return _muted_by_self && (_mute_point != MutePoint (0)); }
|
||||
bool muted_by_self_at (MutePoint mp) const { return _muted_by_self && (_mute_point & mp); }
|
||||
bool muted_by_others_at (MutePoint mp) const;
|
||||
|
||||
gain_t mute_gain_at (MutePoint) const;
|
||||
|
||||
void set_muted (bool yn) { _muted = yn; }
|
||||
void set_muted_by_self (bool yn) { _muted_by_self = yn; }
|
||||
|
||||
void mute_at (MutePoint);
|
||||
void unmute_at (MutePoint);
|
||||
@@ -76,7 +72,7 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
|
||||
|
||||
private:
|
||||
volatile MutePoint _mute_point;
|
||||
volatile bool _muted;
|
||||
volatile bool _muted_by_self;
|
||||
volatile bool _soloed;
|
||||
volatile bool _solo_ignore;
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -748,7 +748,7 @@ Route::set_mute_points (MuteMaster::MutePoint mp)
|
||||
_mute_master->set_mute_points (mp);
|
||||
mute_points_changed (); /* EMIT SIGNAL */
|
||||
|
||||
if (_mute_master->muted()) {
|
||||
if (_mute_master->muted_by_self()) {
|
||||
mute_changed (this); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
@@ -762,7 +762,7 @@ Route::set_mute (bool yn, void *src)
|
||||
}
|
||||
|
||||
if (muted() != yn) {
|
||||
_mute_master->set_muted (yn);
|
||||
_mute_master->set_muted_by_self (yn);
|
||||
mute_changed (src); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
@@ -770,7 +770,7 @@ Route::set_mute (bool yn, void *src)
|
||||
bool
|
||||
Route::muted () const
|
||||
{
|
||||
return _mute_master->muted();
|
||||
return _mute_master->muted_by_self();
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user