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);