rename latched solo option and reverse its meaning; add exclusive solo button functionality in monitor section; add solo/mute override control in monitor section

git-svn-id: svn://localhost/ardour2/branches/3.0@7059 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-05-05 14:09:58 +00:00
parent 2e1d964528
commit 896a0a991c
7 changed files with 96 additions and 14 deletions

View File

@ -408,6 +408,13 @@ style "mixer_solo_button_active" = "solo_button_active"
ythickness = 0
}
style "monitor_opt_button" = "small_button"
{
font_name = "@FONT_SMALLER@"
bg[ACTIVE] = { 1.0, 0.749, 0.247 }
fg[ACTIVE] = { 0, 0, 0 }
}
style "monitor_mono_button" = "small_button"
{
bg[ACTIVE] = { 0.725, 0.925, 0.949 }
@ -1663,6 +1670,8 @@ widget "*MonitorMonoButton" style:highest "monitor_mono_button"
widget "*MonitorMonoButton*" style:highest "monitor_mono_button"
widget "*MonitorInvertButton" style:highest "monitor_invert_button"
widget "*MonitorInvertButton*" style:highest "monitor_invert_button"
widget "*MonitorOptButton" style:highest "monitor_opt_button"
widget "*MonitorOptButton*" style:highest "monitor_opt_button"
widget "*BypassButton" style:highest "red_when_active"
widget "*BypassButton*" style:highest "red_when_active"
widget "*TransportSoloAlert" style:highest "flashing_alert"

View File

@ -52,7 +52,8 @@ MonitorSection::MonitorSection (Session* s)
, mono_button (_("mono"))
, rude_solo_button (_("soloing"))
, rude_audition_button (_("auditioning"))
, exclusive_solo_button (_("Exclusive solo"))
, exclusive_solo_button (_("Exclusive"))
, solo_mute_override_button (_("Solo/Mute"))
{
Glib::RefPtr<Action> act;
@ -127,7 +128,6 @@ MonitorSection::MonitorSection (Session* s)
act->connect_proxy (pfl_button);
}
/* Solo Boost */
solo_boost_control = new VolumeController (little_knob_pixbuf, &solo_boost_adjustment, false, 30, 30);
@ -158,13 +158,34 @@ MonitorSection::MonitorSection (Session* s)
solo_packer->pack_start (*spin_packer, true, true);
exclusive_solo_button.set_name (X_("MonitorCutButton"));
exclusive_solo_button.set_name (X_("MonitorOptButton"));
ARDOUR_UI::instance()->set_tip (&exclusive_solo_button, _("Exclusive solo means that only 1 solo is active at a time"));
act = ActionManager::get_action (X_("Monitor"), X_("toggle-exclusive-solo"));
if (act) {
act->connect_proxy (exclusive_solo_button);
}
solo_mute_override_button.set_name (X_("MonitorOptButton"));
ARDOUR_UI::instance()->set_tip (&solo_mute_override_button, _("If enabled, solo will override mute\n(a soloed & muted track or bus will be audible)"));
act = ActionManager::get_action (X_("Monitor"), X_("toggle-mute-overrides-solo"));
if (act) {
act->connect_proxy (solo_mute_override_button);
}
HBox* solo_opt_box = manage (new HBox);
solo_opt_box->set_spacing (12);
solo_opt_box->set_homogeneous (true);
solo_opt_box->pack_start (exclusive_solo_button);
solo_opt_box->pack_start (solo_mute_override_button);
solo_opt_box->show ();
upper_packer.set_spacing (12);
upper_packer.pack_start (rude_solo_button, false, false);
upper_packer.pack_start (rude_audition_button, false, false);
upper_packer.pack_start (solo_model_box, false, false);
upper_packer.pack_start (exclusive_solo_button, false, false);
upper_packer.pack_start (*solo_opt_box, false, false);
upper_packer.pack_start (*solo_packer, false, false);
act = ActionManager::get_action (X_("Monitor"), X_("monitor-cut-all"));
@ -411,6 +432,38 @@ MonitorSection::set_button_names ()
solo_button_label.set_text ("rec");
}
void
MonitorSection::toggle_exclusive_solo ()
{
if (!_monitor) {
return;
}
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "toggle-exclusive-solo");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
Config->set_exclusive_solo (tact->get_active());
}
}
void
MonitorSection::toggle_mute_overrides_solo ()
{
if (!_monitor) {
return;
}
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "toggle-mute-overrides-solo");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
cerr << "Set solo_mute_override to " << tact->get_active() << endl;
Config->set_solo_mute_override (tact->get_active());
}
}
void
MonitorSection::dim_all ()
{
@ -537,6 +590,7 @@ MonitorSection::register_actions ()
{
string action_name;
string action_descr;
Glib::RefPtr<Action> act;
monitor_actions = ActionGroup::create (X_("Monitor"));
ActionManager::add_action_group (monitor_actions);
@ -550,6 +604,22 @@ MonitorSection::register_actions ()
ActionManager::register_toggle_action (monitor_actions, "monitor-dim-all", "",
sigc::mem_fun (*this, &MonitorSection::dim_all));
act = ActionManager::register_toggle_action (monitor_actions, "toggle-exclusive-solo", "",
sigc::mem_fun (*this, &MonitorSection::toggle_exclusive_solo));
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
tact->set_active (Config->get_exclusive_solo());
act = ActionManager::register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", "",
sigc::mem_fun (*this, &MonitorSection::toggle_mute_overrides_solo));
tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
tact->set_active (Config->get_solo_mute_override());
/* map from RC config */
/* note the 1-based counting (for naming - backend uses 0-based) */
for (uint32_t chn = 1; chn <= 16; ++chn) {

View File

@ -92,6 +92,8 @@ class MonitorSection : public RouteUI
void dim_all ();
void cut_all ();
void mono ();
void toggle_exclusive_solo ();
void toggle_mute_overrides_solo ();
void dim_level_changed ();
void solo_boost_changed ();
void gain_value_changed ();
@ -115,6 +117,7 @@ class MonitorSection : public RouteUI
BindableToggleButton rude_solo_button;
BindableToggleButton rude_audition_button;
BindableToggleButton exclusive_solo_button;
BindableToggleButton solo_mute_override_button;
void do_blink (bool);
void solo_blink (bool);
@ -124,7 +127,7 @@ class MonitorSection : public RouteUI
void solo_cut_changed ();
void update_solo_model ();
void parameter_changed (std::string);
PBD::ScopedConnection config_connection;
PBD::ScopedConnectionList control_connections;

View File

@ -1195,10 +1195,10 @@ RCOptionEditor::RCOptionEditor ()
add_option (_("Audio"),
new BoolOption (
"solo-latched",
_("Latched solo"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_latched),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_latched)
"exclusive-solo",
_("Exclusive solo"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_exclusive_solo),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_exclusive_solo)
));
add_option (_("Audio"),

View File

@ -82,7 +82,7 @@ CONFIG_VARIABLE (ListenPosition, listen_position, "listen-position", AfterFaderL
CONFIG_VARIABLE (bool, use_monitor_bus, "use-monitor-bus", false)
CONFIG_VARIABLE (bool, solo_control_is_listen_control, "solo-control-is-listen-control", false)
CONFIG_VARIABLE (bool, solo_latched, "solo-latched", true)
CONFIG_VARIABLE (bool, exclusive_solo, "exclusive-solo", false)
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", true)

View File

@ -618,9 +618,9 @@ Route::mod_solo_by_others_upstream (int32_t delta)
_soloed_by_others_upstream += delta;
}
DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbU delta %2 = %3 old = %4 sbd %5 ss %6 latched %7\n",
DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbU delta %2 = %3 old = %4 sbd %5 ss %6 exclusive %7\n",
name(), delta, _soloed_by_others_upstream, old_sbu,
_soloed_by_others_downstream, _self_solo, Config->get_solo_latched()));
_soloed_by_others_downstream, _self_solo, Config->get_exclusive_solo()));
/* push the inverse solo change to everything that feeds us.
@ -639,7 +639,7 @@ Route::mod_solo_by_others_upstream (int32_t delta)
((old_sbu == 0 && _soloed_by_others_upstream > 0) ||
(old_sbu > 0 && _soloed_by_others_upstream == 0))) {
if (delta > 0 || Config->get_solo_latched()) {
if (delta > 0 || !Config->get_exclusive_solo()) {
DEBUG_TRACE (DEBUG::Solo, "\t ... INVERT push\n");
for (FedBy::iterator i = _fed_by.begin(); i != _fed_by.end(); ++i) {
boost::shared_ptr<Route> sr = i->r.lock();

View File

@ -2261,7 +2261,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
delta = -1;
}
if (delta == 1 && !Config->get_solo_latched()) {
if (delta == 1 && Config->get_exclusive_solo()) {
/* new solo: disable all other solos */
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) {