diff options
author | Len Ovens <len@ovenwerks.net> | 2015-11-01 19:25:45 -0800 |
---|---|---|
committer | Len Ovens <len@ovenwerks.net> | 2015-11-01 19:25:45 -0800 |
commit | 84d44eb5a3fd95f20f9c5e33ff8c05199dcccc38 (patch) | |
tree | 2ea320e6bb283c11b61e2939bd38e2619cfb2f53 /libs | |
parent | 8ae23c6952d007410047e42fa348233825a7e180 (diff) |
Don't handle possible phase change if no audio channels in mackie control
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/strip.cc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 17d56f473a..4def2bc6ec 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -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->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 */ possible_pot_parameters.clear(); @@ -273,11 +266,21 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/) if (_route->trim() && route()->trim()->active()) { possible_trim_parameters.push_back (TrimAutomation); + _trim_mode = TrimAutomation; } if (_route->phase_invert().size()) { possible_trim_parameters.push_back (PhaseAutomation); + if (_trim_mode != TrimAutomation) { + _trim_mode = PhaseAutomation; + } } + + /* Update */ + _pan_mode = PanAzimuthAutomation; + potmode_changed (false); + notify_all (); + } void @@ -419,6 +422,11 @@ void Strip::notify_phase_changed (bool force_update) { if (_route) { + if (!_route->phase_invert().size()) { + _surface->write (_vpot->zero()); + return; + } + Control* control = 0; ControlParameterMap::iterator i = control_by_parameter.find (PhaseAutomation); @@ -1081,8 +1089,8 @@ Strip::potmode_changed (bool notify) switch (pm) { case MackieControlProtocol::Pan: // 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))); + set_vpot_parameter (_pan_mode); break; case MackieControlProtocol::Trim: 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; - 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 (); |