diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-11-25 13:22:42 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-11-25 13:22:42 +0000 |
commit | cbd258bc097a0c0280d927f184e72ee4a8312da5 (patch) | |
tree | 8a104918537e96f8dfb3e34ece5cfb9750dc84cb /libs | |
parent | 8c4c0b7d8022cbad90804dc789b9d359a828d25e (diff) |
lincoln's solo-mute-override patch modified/extended to track the option changing state, plus build ardour.menus as part of the default target
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4254 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/configuration_vars.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/route.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/route.cc | 25 | ||||
-rw-r--r-- | libs/ardour/session.cc | 17 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 2 |
6 files changed, 44 insertions, 5 deletions
diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/configuration_vars.h index 534bd64be3..481dad6921 100644 --- a/libs/ardour/ardour/configuration_vars.h +++ b/libs/ardour/ardour/configuration_vars.h @@ -91,6 +91,7 @@ CONFIG_VARIABLE (bool, solo_latched, "solo-latched", true) CONFIG_VARIABLE (bool, latched_record_enable, "latched-record-enable", false) CONFIG_VARIABLE (bool, all_safe, "all-safe", false) CONFIG_VARIABLE (bool, show_solo_mutes, "show-solo-mutes", false) +CONFIG_VARIABLE (bool, solo_mute_override, "solo-mute-override", false) CONFIG_VARIABLE (bool, tape_machine_mode, "tape-machine-mode", false) /* click */ diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 4c07b057ff..f80eb45fc7 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -116,7 +116,7 @@ class Route : public IO void set_solo_safe (bool yn, void *src); bool solo_safe() const { return _solo_safe; } - + void set_mute (bool yn, void *src); bool muted() const { return _muted; } bool solo_muted() const { return desired_solo_gain == 0.0; } @@ -247,6 +247,7 @@ class Route : public IO protected: friend class Session; + void catch_up_on_solo_mute_override (); void set_solo_mute (bool yn); void set_block_size (nframes_t nframes); bool has_external_redirects() const; diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 0b845f6eeb..ac0c052fa1 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1479,6 +1479,7 @@ class Session : public PBD::StatefulDestructible void route_mute_changed (void *src); void route_solo_changed (void *src, boost::weak_ptr<Route>); void catch_up_on_solo (); + void catch_up_on_solo_mute_override (); void update_route_solo_state (); void modify_solo_mute (bool, bool); void strip_portname_for_solo (string& portname); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index a2cf025b85..92f6ca3acd 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -816,6 +816,24 @@ Route::set_solo (bool yn, void *src) _soloed = yn; solo_changed (src); /* EMIT SIGNAL */ _solo_control.Changed (); /* EMIT SIGNAL */ + } + + catch_up_on_solo_mute_override (); +} + +void +Route::catch_up_on_solo_mute_override () +{ + Glib::Mutex::Lock lm (declick_lock); + + if (_muted) { + if (Config->get_solo_mute_override()) { + desired_mute_gain = (_soloed?1.0:0.0); + } else { + desired_mute_gain = 0.0; + } + } else { + desired_mute_gain = 1.0; } } @@ -855,7 +873,12 @@ Route::set_mute (bool yn, void *src) _mute_control.Changed (); /* EMIT SIGNAL */ Glib::Mutex::Lock lm (declick_lock); - desired_mute_gain = (yn?0.0f:1.0f); + + if (_soloed && Config->get_solo_mute_override()){ + desired_mute_gain = 1.0f; + } else { + desired_mute_gain = (yn?0.0f:1.0f); + } } } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 86e55845e4..04fb880bcb 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2302,8 +2302,6 @@ Session::update_route_solo_state () bool is_track = false; bool signal = false; - /* caller must hold RouteLock */ - /* this is where we actually implement solo by changing the solo mute setting of each track. */ @@ -2404,7 +2402,20 @@ Session::catch_up_on_solo () */ update_route_solo_state(); } - + +void +Session::catch_up_on_solo_mute_override () +{ + /* this is called whenever the param solo-mute-override is + changed. + */ + shared_ptr<RouteList> r = routes.reader (); + + for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { + (*i)->catch_up_on_solo_mute_override (); + } +} + shared_ptr<Route> Session::route_by_name (string name) { diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 3b68f8fb44..2b7aca67a7 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -3363,6 +3363,8 @@ Session::config_changed (const char* parameter_name) buf[1] = (Config->get_initial_program_change() & 0x7f); deliver_midi (_mmc_port, buf, 2); } + } else if (PARAM_IS ("solo-mute-override")) { + catch_up_on_solo_mute_override (); } set_dirty (); |