From 581589f08060302adcf87c52c2cb69583c97a755 Mon Sep 17 00:00:00 2001 From: Todd Naugle Date: Mon, 19 Jul 2021 12:24:36 -0500 Subject: [PATCH] Mackie Control: Don't call port write directly since it bypasses active chk This keeps the master fader from sending midi output before everything is initialized. --- libs/surfaces/mackie/surface.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index b5a06b636d..e143b46d36 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -482,9 +482,9 @@ Surface::master_gain_changed () return; } - DEBUG_TRACE (DEBUG::MackieControl, "Surface::master_gain_changed: updating surface master fader\n"); + DEBUG_TRACE (DEBUG::MackieControl, string_compose("Surface::master_gain_changed: val %1, pos %2\n", ac->get_value(), normalized_position)); - _port->write (_master_fader->set_position (normalized_position)); + write (_master_fader->set_position (normalized_position)); _last_master_gain_written = normalized_position; } @@ -532,7 +532,7 @@ Surface::master_meter_changed () /* we can use up to 13 segments */ segment = lrintf ((result.second/115.0) * 13.0); - _port->write (MidiByteArray (2, 0xd1, (i<<4) | segment)); + write (MidiByteArray (2, 0xd1, (i<<4) | segment)); } } @@ -715,7 +715,7 @@ Surface::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uin DEBUG_TRACE (DEBUG::MackieControl, "Handling master fader\n"); /* master fader */ fader->set_value (pos); // alter master gain - _port->write (fader->set_position (pos)); // write back value (required for servo) + write (fader->set_position (pos)); // write back value (required for servo) } } else { DEBUG_TRACE (DEBUG::MackieControl, "fader not found\n");