- case TrimAutomation:
- _trim_mode = TrimAutomation;
- vpot_parameter = TrimAutomation;
- if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
- /* gain to vpot, trim to fader */
- _vpot->set_control (_route->gain_control());
- control_by_parameter[GainAutomation] = _vpot;
- if (_route->trim() && route()->trim()->active()) {
- _fader->set_control (_route->trim_control());
- control_by_parameter[TrimAutomation] = _fader;
- } else {
- _fader->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[TrimAutomation] = 0;
- }
- } else {
- /* gain to fader, trim to vpot */
- _fader->set_control (_route->gain_control());
- control_by_parameter[GainAutomation] = _fader;
- if (_route->trim() && route()->trim()->active()) {
- _vpot->set_control (_route->trim_control());
- control_by_parameter[TrimAutomation] = _vpot;
- } else {
- _vpot->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[TrimAutomation] = 0;
- }
- }
- break;
- case PhaseAutomation:
- _trim_mode = PhaseAutomation;
- vpot_parameter = PhaseAutomation;
- if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
- /* gain to vpot, phase to fader */
- _vpot->set_control (_route->gain_control());
- control_by_parameter[GainAutomation] = _vpot;
- if (_route->phase_invert().size()) {
- _fader->set_control (_route->phase_control());
- control_by_parameter[PhaseAutomation] = _fader;
- } else {
- _fader->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[PhaseAutomation] = 0;
- }
- } else {
- /* gain to fader, phase to vpot */
- _fader->set_control (_route->gain_control());
- control_by_parameter[GainAutomation] = _fader;
- if (_route->phase_invert().size()) {
- _vpot->set_control (_route->phase_control());
- control_by_parameter[PhaseAutomation] = _vpot;
- } else {
- _vpot->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[PhaseAutomation] = 0;
- }
- }
- break;