13
0

Don't handle possible phase change if no audio channels in mackie control

This commit is contained in:
Len Ovens 2015-11-01 19:25:45 -08:00
parent 8ae23c6952
commit 84d44eb5a3

View File

@ -238,13 +238,6 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
_route->active_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_active_changed, this), ui_context()); _route->active_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_active_changed, this), ui_context());
_route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_route_deleted, this), ui_context()); _route->DropReferences.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_route_deleted, this), ui_context());
/* Update */
_pan_mode = PanAzimuthAutomation;
_trim_mode = TrimAutomation;
potmode_changed (true);
notify_all ();
/* setup legal VPot modes for this route */ /* setup legal VPot modes for this route */
possible_pot_parameters.clear(); possible_pot_parameters.clear();
@ -273,13 +266,23 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
if (_route->trim() && route()->trim()->active()) { if (_route->trim() && route()->trim()->active()) {
possible_trim_parameters.push_back (TrimAutomation); possible_trim_parameters.push_back (TrimAutomation);
_trim_mode = TrimAutomation;
} }
if (_route->phase_invert().size()) { if (_route->phase_invert().size()) {
possible_trim_parameters.push_back (PhaseAutomation); possible_trim_parameters.push_back (PhaseAutomation);
if (_trim_mode != TrimAutomation) {
_trim_mode = PhaseAutomation;
} }
} }
/* Update */
_pan_mode = PanAzimuthAutomation;
potmode_changed (false);
notify_all ();
}
void void
Strip::notify_all() Strip::notify_all()
{ {
@ -419,6 +422,11 @@ void
Strip::notify_phase_changed (bool force_update) Strip::notify_phase_changed (bool force_update)
{ {
if (_route) { if (_route) {
if (!_route->phase_invert().size()) {
_surface->write (_vpot->zero());
return;
}
Control* control = 0; Control* control = 0;
ControlParameterMap::iterator i = control_by_parameter.find (PhaseAutomation); ControlParameterMap::iterator i = control_by_parameter.find (PhaseAutomation);
@ -1081,8 +1089,8 @@ Strip::potmode_changed (bool notify)
switch (pm) { switch (pm) {
case MackieControlProtocol::Pan: case MackieControlProtocol::Pan:
// This needs to set current pan mode (azimuth or width... or whatever) // This needs to set current pan mode (azimuth or width... or whatever)
set_vpot_parameter (_pan_mode);
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Assign pot to Pan mode %1\n", enum_2_string (_pan_mode))); DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Assign pot to Pan mode %1\n", enum_2_string (_pan_mode)));
set_vpot_parameter (_pan_mode);
break; break;
case MackieControlProtocol::Trim: case MackieControlProtocol::Trim:
DEBUG_TRACE (DEBUG::MackieControl, "Assign pot to Trim mode.\n"); DEBUG_TRACE (DEBUG::MackieControl, "Assign pot to Trim mode.\n");
@ -1208,7 +1216,7 @@ Strip::set_vpot_parameter (Evoral::Parameter p)
{ {
boost::shared_ptr<Pannable> pannable; boost::shared_ptr<Pannable> pannable;
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("switch to vpot mode %1\n", p)); DEBUG_TRACE (DEBUG::MackieControl, string_compose ("switch to vpot mode %1\n", p.type()));
reset_saved_values (); reset_saved_values ();