factor out Route::muted_by_others from existing code
This commit is contained in:
parent
0412060b44
commit
64586a8301
@ -1201,8 +1201,7 @@ RouteUI::mute_active_state (Session* s, boost::shared_ptr<Route> r)
|
||||
if (r->muted ()) {
|
||||
/* full mute */
|
||||
return Gtkmm2ext::ExplicitActive;
|
||||
} else if (!r->is_master() && s->soloing() && !r->soloed() && !r->solo_isolated()) {
|
||||
/* master is NEVER muted by others */
|
||||
} else if (r->muted_by_others()) {
|
||||
return Gtkmm2ext::ImplicitActive;
|
||||
} else {
|
||||
/* no mute at all */
|
||||
|
@ -151,6 +151,8 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
|
||||
bool muted () const;
|
||||
void set_mute (bool yn, void* src);
|
||||
|
||||
bool muted_by_others() const;
|
||||
|
||||
/* controls use set_solo() to modify this route's solo state
|
||||
*/
|
||||
|
||||
|
@ -1033,6 +1033,17 @@ Route::muted () const
|
||||
return _mute_master->muted_by_self();
|
||||
}
|
||||
|
||||
bool
|
||||
Route::muted_by_others () const
|
||||
{
|
||||
//master is never muted by others
|
||||
if (is_master())
|
||||
return false;
|
||||
|
||||
//now check to see if something is soloed (and I am not)
|
||||
return (_session.soloing() && !self_soloed() && !solo_isolated());
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
dump_processors(const string& name, const list<boost::shared_ptr<Processor> >& procs)
|
||||
|
Loading…
Reference in New Issue
Block a user