fix exclusive solo group-override
This commit is contained in:
parent
96b45d4909
commit
44f1f0caf4
@ -1536,9 +1536,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||
|
||||
/* mixer stuff */
|
||||
|
||||
void route_listen_changed (bool leave_group_alone, boost::weak_ptr<Route>);
|
||||
void route_listen_changed (bool group_override, boost::weak_ptr<Route>);
|
||||
void route_mute_changed (void *src);
|
||||
void route_solo_changed (bool self_solo_change, bool leave_group_alone, boost::weak_ptr<Route>);
|
||||
void route_solo_changed (bool self_solo_change, bool group_override, boost::weak_ptr<Route>);
|
||||
void route_solo_isolated_changed (void *src, boost::weak_ptr<Route>);
|
||||
void update_route_solo_state (boost::shared_ptr<RouteList> r = boost::shared_ptr<RouteList>());
|
||||
|
||||
|
@ -791,7 +791,7 @@ Route::set_listen (bool yn, void* src, bool group_override)
|
||||
}
|
||||
_mute_master->set_soloed_by_others (false);
|
||||
|
||||
listen_changed (src, group_active); /* EMIT SIGNAL */
|
||||
listen_changed (src, group_override); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -870,7 +870,6 @@ Route::set_solo (bool yn, void *src, bool group_override)
|
||||
return;
|
||||
}
|
||||
|
||||
// explicit XOR
|
||||
bool group_active = _route_group && _route_group->is_active() && _route_group->is_solo();
|
||||
if (group_override && _route_group) {
|
||||
group_active = !group_active;
|
||||
@ -886,7 +885,7 @@ Route::set_solo (bool yn, void *src, bool group_override)
|
||||
if (self_soloed() != yn) {
|
||||
set_self_solo (yn);
|
||||
set_mute_master_solo ();
|
||||
solo_changed (true, src, group_active); /* EMIT SIGNAL */
|
||||
solo_changed (true, src, group_override); /* EMIT SIGNAL */
|
||||
_solo_control->Changed (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
|
@ -3490,7 +3490,7 @@ Session::route_mute_changed (void* /*src*/)
|
||||
}
|
||||
|
||||
void
|
||||
Session::route_listen_changed (bool leave_group_alone, boost::weak_ptr<Route> wpr)
|
||||
Session::route_listen_changed (bool group_override, boost::weak_ptr<Route> wpr)
|
||||
{
|
||||
boost::shared_ptr<Route> route = wpr.lock();
|
||||
if (!route) {
|
||||
@ -3503,12 +3503,16 @@ Session::route_listen_changed (bool leave_group_alone, boost::weak_ptr<Route> wp
|
||||
if (Config->get_exclusive_solo()) {
|
||||
/* new listen: disable all other listen, except solo-grouped channels */
|
||||
RouteGroup* rg = route->route_group ();
|
||||
bool leave_group_alone = (rg && rg->is_active() && rg->is_solo());
|
||||
if (group_override && rg) {
|
||||
leave_group_alone = !leave_group_alone;
|
||||
}
|
||||
boost::shared_ptr<RouteList> r = routes.reader ();
|
||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||
if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner() || (leave_group_alone && ((*i)->route_group() == rg))) {
|
||||
continue;
|
||||
}
|
||||
(*i)->set_listen (false, this);
|
||||
(*i)->set_listen (false, this, group_override);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3552,7 +3556,7 @@ Session::route_solo_isolated_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
|
||||
}
|
||||
|
||||
void
|
||||
Session::route_solo_changed (bool self_solo_change, bool leave_group_alone, boost::weak_ptr<Route> wpr)
|
||||
Session::route_solo_changed (bool self_solo_change, bool group_override, boost::weak_ptr<Route> wpr)
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::Solo, string_compose ("route solo change, self = %1\n", self_solo_change));
|
||||
|
||||
@ -3574,6 +3578,10 @@ Session::route_solo_changed (bool self_solo_change, bool leave_group_alone, boo
|
||||
}
|
||||
|
||||
RouteGroup* rg = route->route_group ();
|
||||
bool leave_group_alone = (rg && rg->is_active() && rg->is_solo());
|
||||
if (group_override && rg) {
|
||||
leave_group_alone = !leave_group_alone;
|
||||
}
|
||||
if (delta == 1 && Config->get_exclusive_solo()) {
|
||||
|
||||
/* new solo: disable all other solos, but not the group if its solo-enabled */
|
||||
@ -3583,7 +3591,7 @@ Session::route_solo_changed (bool self_solo_change, bool leave_group_alone, boo
|
||||
(leave_group_alone && ((*i)->route_group() == rg))) {
|
||||
continue;
|
||||
}
|
||||
(*i)->set_solo (false, this);
|
||||
(*i)->set_solo (false, this, group_override);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user