From 6bdb70727f06cf306fa068bf611e71bd02d0e59f Mon Sep 17 00:00:00 2001 From: Eric Sherman Date: Fri, 6 Aug 2021 10:41:05 -0400 Subject: [PATCH] uses Transport::thruActivated for initial thru state --- src/MIDI.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MIDI.hpp b/src/MIDI.hpp index 50da225..32d20c6 100644 --- a/src/MIDI.hpp +++ b/src/MIDI.hpp @@ -91,7 +91,7 @@ void MidiInterface::begin(Channel inChannel) mMessage.data2 = 0; mMessage.length = 0; - mThruFilterCallback = thruOn; + mThruFilterCallback = Transport::thruActivated ? thruOn : thruOff; mThruMapCallback = thruEcho; } @@ -1371,7 +1371,7 @@ inline void MidiInterface::UpdateLastSentTime() template void MidiInterface::processThru() { - if (!mThruFilterCallback(mMessage)) + if (!Transport::thruActivated || !mThruFilterCallback(mMessage)) return; MidiMessage thruMessage = mThruMapCallback(mMessage);