mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-20 04:15:46 +01:00
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
This commit is contained in:
parent
8c4c0b7d80
commit
cbd258bc09
11 changed files with 57 additions and 5 deletions
|
|
@ -466,6 +466,7 @@ Default(ardour_dark_theme)
|
|||
Default(ardour_light_theme)
|
||||
Default(ardour_dark_sae_theme)
|
||||
Default(ardour_light_sae_theme)
|
||||
Default(ardour_menus)
|
||||
|
||||
if env['VST']:
|
||||
Default(ardourlib)
|
||||
|
|
|
|||
|
|
@ -516,6 +516,7 @@
|
|||
<menuitem action='SoloInPlace'/>
|
||||
<menuitem action='SoloViaBus'/>
|
||||
<menuitem action='ShowSoloMutes'/>
|
||||
<menuitem action='SoloMuteOverride'/>
|
||||
</menu>
|
||||
<menu action='Crossfades'>
|
||||
<menuitem action='toggle-xfades-active'/>
|
||||
|
|
|
|||
|
|
@ -706,6 +706,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void toggle_GainReduceFastTransport();
|
||||
void toggle_LatchedSolo();
|
||||
void toggle_ShowSoloMutes();
|
||||
void toggle_SoloMuteOverride();
|
||||
void toggle_LatchedRecordEnable ();
|
||||
void toggle_RegionEquivalentsOverlap ();
|
||||
void toggle_PrimaryClockDeltaEditCursor ();
|
||||
|
|
|
|||
|
|
@ -511,6 +511,8 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("ShowSoloMutes"), _("Show solo muting"), mem_fun (*this, &ARDOUR_UI::toggle_ShowSoloMutes));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("SoloMuteOverride"), _("Override muting"), mem_fun (*this, &ARDOUR_UI::toggle_SoloMuteOverride));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
/* !!! REMEMBER THAT RADIO ACTIONS HAVE TO BE HANDLED WITH MORE FINESSE THAN SIMPLE TOGGLES !!! */
|
||||
|
||||
|
|
|
|||
|
|
@ -553,6 +553,12 @@ ARDOUR_UI::toggle_ShowSoloMutes()
|
|||
ActionManager::toggle_config_state ("options", "ShowSoloMutes", &Configuration::set_show_solo_mutes, &Configuration::get_show_solo_mutes);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_SoloMuteOverride()
|
||||
{
|
||||
ActionManager::toggle_config_state ("options", "SoloMuteOverride", &Configuration::set_solo_mute_override, &Configuration::get_solo_mute_override);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_PrimaryClockDeltaEditCursor()
|
||||
{
|
||||
|
|
@ -1105,6 +1111,8 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
|
|||
ActionManager::map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched);
|
||||
} else if (PARAM_IS ("show-solo-mutes")) {
|
||||
ActionManager::map_some_state ("options", "ShowSoloMutes", &Configuration::get_show_solo_mutes);
|
||||
} else if (PARAM_IS ("solo-mute-override")) {
|
||||
ActionManager::map_some_state ("options", "SoloMuteOverride", &Configuration::get_solo_mute_override);
|
||||
} else if (PARAM_IS ("solo-model")) {
|
||||
map_solo_model ();
|
||||
} else if (PARAM_IS ("auto-play")) {
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue