summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-04-15 00:38:03 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:41 -0400
commit6de4953be8dc5cd413b405d4801f086567923965 (patch)
tree4e428efc0668e9dc78d8cfee407042b7f976742d /gtk2_ardour
parent7d493b091ae2741db39a65cc62e9d17ef57d7606 (diff)
a variety of changes that get closer to correctly functioning behaviour for VCA solo+mute (BUT ARE NOT DONE YET)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/route_ui.cc20
-rw-r--r--gtk2_ardour/vca_master_strip.cc25
2 files changed, 30 insertions, 15 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 91b14d9c78..3f00966c31 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -415,7 +415,7 @@ RouteUI::mute_press (GdkEventButton* ev)
}
DisplaySuspender ds;
- _session->set_controls (route_list_to_control_list (copy, &Route::mute_control), _route->muted() ? 0.0 : 1.0, Controllable::UseGroup);
+ _session->set_controls (route_list_to_control_list (copy, &Route::mute_control), _route->muted_by_self() ? 0.0 : 1.0, Controllable::UseGroup);
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
@@ -444,7 +444,7 @@ RouteUI::mute_press (GdkEventButton* ev)
}
DisplaySuspender ds;
- _session->set_controls (route_list_to_control_list (rl, &Route::mute_control), _route->muted() ? 0.0 : 1.0, Controllable::InverseGroup);
+ _session->set_controls (route_list_to_control_list (rl, &Route::mute_control), _route->muted_by_self() ? 0.0 : 1.0, Controllable::InverseGroup);
}
} else {
@@ -458,7 +458,7 @@ RouteUI::mute_press (GdkEventButton* ev)
_mute_release->routes = rl;
}
- _session->set_control (_route->mute_control(), _route->muted() ? 0.0 : 1.0, Controllable::UseGroup);
+ _session->set_control (_route->mute_control(), _route->muted_by_self() ? 0.0 : 1.0, Controllable::UseGroup);
}
}
@@ -1225,10 +1225,12 @@ RouteUI::mute_active_state (Session* s, boost::shared_ptr<Route> r)
if (Config->get_show_solo_mutes() && !Config->get_solo_control_is_listen_control ()) {
- if (r->muted ()) {
+ std::cerr << r->name() << " self " << r->mute_control()->muted_by_self() << " others " << r->muted_by_others() << " soloing " << r->muted_by_others_soloing() << std::endl;
+
+ if (r->mute_control()->muted_by_self ()) {
/* full mute */
return Gtkmm2ext::ExplicitActive;
- } else if (r->muted_by_others_soloing () || r->mute_control()->get_masters_value()) {
+ } else if (r->muted_by_others_soloing () || r->muted_by_others()) {
/* this will reflect both solo mutes AND master mutes */
return Gtkmm2ext::ImplicitActive;
} else {
@@ -1238,15 +1240,11 @@ RouteUI::mute_active_state (Session* s, boost::shared_ptr<Route> r)
} else {
- if (r->muted()) {
+ if (r->mute_control()->muted_by_self()) {
/* full mute */
return Gtkmm2ext::ExplicitActive;
} else if (r->muted_by_others()) {
- /* note the direct use of MuteMaster API here. We are
- not interested in showing
- others-soloed-so-this-muted status in this
- conditional branch.
- */
+ /* this shows only master mutes, not mute-by-others-soloing */
return Gtkmm2ext::ImplicitActive;
} else {
/* no mute at all */
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc
index 1b1572cf74..6f43228424 100644
--- a/gtk2_ardour/vca_master_strip.cc
+++ b/gtk2_ardour/vca_master_strip.cc
@@ -131,6 +131,8 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
_vca->solo_control()->Changed.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::solo_changed, this), gui_context());
_vca->mute_control()->Changed.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::mute_changed, this), gui_context());
+ /* only need to connect to one of these to update VCA status */
+
_vca->gain_control()->MasterStatusChange.connect (vca_connections,
invalidator (*this),
boost::bind (&VCAMasterStrip::update_vca_display, this),
@@ -198,14 +200,20 @@ VCAMasterStrip::set_selected (bool yn)
bool
VCAMasterStrip::solo_release (GdkEventButton*)
{
- _vca->solo_control()->set_value (_vca->solo_control()->get_value() ? 0.0 : 1.0, Controllable::NoGroup);
+ /* We use NoGroup because VCA controls are never part of a group. This
+ is redundant, but clear.
+ */
+ _vca->solo_control()->set_value (_vca->solo_control()->self_soloed() ? 0.0 : 1.0, Controllable::NoGroup);
return true;
}
bool
VCAMasterStrip::mute_release (GdkEventButton*)
{
- _vca->mute_control()->set_value (_vca->mute_control()->get_value() ? 0.0 : 1.0, Controllable::NoGroup);
+ /* We use NoGroup because VCA controls are never part of a group. This
+ is redundant, but clear.
+ */
+ _vca->mute_control()->set_value (_vca->mute_control()->muted_by_self() ? 0.0 : 1.0, Controllable::NoGroup);
return true;
}
@@ -229,8 +237,11 @@ VCAMasterStrip::set_solo_text ()
void
VCAMasterStrip::mute_changed ()
{
- if (_vca->mute_control()->muted()) {
+ std::cerr << "Mute changed for " << _vca->number() << std::endl;
+ if (_vca->mute_control()->muted_by_self()) {
mute_button.set_active_state (ExplicitActive);
+ } else if (_vca->mute_control()->muted_by_others()) {
+ mute_button.set_active_state (ImplicitActive);
} else {
mute_button.set_active_state (Gtkmm2ext::Off);
}
@@ -239,7 +250,7 @@ VCAMasterStrip::mute_changed ()
void
VCAMasterStrip::solo_changed ()
{
- if (_vca->solo_control()->soloed()) {
+ if (_vca->solo_control()->soloed() || _vca->solo_control()->get_masters_value()) {
solo_button.set_active_state (ExplicitActive);
} else {
solo_button.set_active_state (Gtkmm2ext::Off);
@@ -257,10 +268,14 @@ VCAMasterStrip::vca_menu_toggle (CheckMenuItem* menuitem, uint32_t n)
vca_unassign ();
} else {
_vca->gain_control()->remove_master (vca->gain_control());
+ _vca->solo_control()->remove_master (vca->solo_control());
+ _vca->mute_control()->remove_master (vca->mute_control());
}
} else {
if (vca) {
_vca->gain_control()->add_master (vca->gain_control());
+ _vca->mute_control()->add_master (vca->mute_control());
+ _vca->solo_control()->add_master (vca->solo_control());
}
}
}
@@ -269,6 +284,8 @@ void
VCAMasterStrip::vca_unassign ()
{
_vca->gain_control()->clear_masters ();
+ _vca->solo_control()->clear_masters ();
+ _vca->mute_control()->clear_masters ();
}
bool