diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2015-05-29 15:17:46 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2015-05-29 15:21:20 -0500 |
commit | 64586a8301e964271ba1181f292847345bc4117e (patch) | |
tree | 8dcc84aa18f63feb583d10326b5d3ca42f1db4c7 /libs | |
parent | 0412060b443bf289c80c62c119ab3114e0629892 (diff) |
factor out Route::muted_by_others from existing code
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/route.h | 2 | ||||
-rw-r--r-- | libs/ardour/route.cc | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index fbce3fd3f3..8237219020 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -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 */ diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index a793ae5b2a..be7174f240 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -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) |