13
0

faderport: simpler logic for master/monitor/other

When choosing master or monitor, do NOT save master or monitor as the pre_{master,monitor}_route under
any circumstances. This means that master/monitor choices do not stack, and just switch between them.
This commit is contained in:
Paul Davis 2015-11-25 17:56:22 -05:00
parent 2f8cc0718a
commit e1794ae678
2 changed files with 14 additions and 14 deletions

View File

@ -769,6 +769,11 @@ FaderPort::set_current_route (boost::shared_ptr<Route> r)
_current_route = r;
/* turn this off. It will be turned on back on in use_master() or
use_monitor() as appropriate.
*/
button_info(Output).set_led_state (_output_port, false);
if (_current_route) {
_current_route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort::drop_current_route, this), this);

View File

@ -102,15 +102,12 @@ FaderPort::use_master ()
if (_current_route == r) {
r = pre_master_route.lock();
set_current_route (r);
if (r == session->monitor_out()) {
button_info(Output).set_led_state (_output_port, true);
blinkers.push_back (Output);
} else {
button_info(Output).set_led_state (_output_port, false);
blinkers.remove (Output);
}
button_info(Output).set_led_state (_output_port, false);
blinkers.remove (Output);
} else {
pre_master_route = boost::weak_ptr<Route> (_current_route);
if (_current_route != session->master_out() && _current_route != session->monitor_out()) {
pre_master_route = boost::weak_ptr<Route> (_current_route);
}
set_current_route (r);
button_info(Output).set_led_state (_output_port, true);
blinkers.remove (Output);
@ -127,14 +124,12 @@ FaderPort::use_monitor ()
if (_current_route == r) {
r = pre_monitor_route.lock();
set_current_route (r);
if (r == session->master_out()) {
button_info(Output).set_led_state (_output_port, true);
} else {
button_info(Output).set_led_state (_output_port, false);
}
button_info(Output).set_led_state (_output_port, false);
blinkers.remove (Output);
} else {
pre_monitor_route = boost::weak_ptr<Route> (_current_route);
if (_current_route != session->master_out() && _current_route != session->monitor_out()) {
pre_monitor_route = boost::weak_ptr<Route> (_current_route);
}
set_current_route (r);
button_info(Output).set_led_state (_output_port, true);
blinkers.push_back (Output);