Skip to content

Commit

Permalink
uses Transport::thruActivated for initial thru state
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperbolist committed Aug 6, 2021
1 parent 2ae9d9e commit 6bdb707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MIDI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void MidiInterface<Transport, Settings, Platform>::begin(Channel inChannel)
mMessage.data2 = 0;
mMessage.length = 0;

mThruFilterCallback = thruOn;
mThruFilterCallback = Transport::thruActivated ? thruOn : thruOff;
mThruMapCallback = thruEcho;
}

Expand Down Expand Up @@ -1371,7 +1371,7 @@ inline void MidiInterface<Transport, Settings, Platform>::UpdateLastSentTime()
template<class Transport, class Settings, class Platform>
void MidiInterface<Transport, Settings, Platform>::processThru()
{
if (!mThruFilterCallback(mMessage))
if (!Transport::thruActivated || !mThruFilterCallback(mMessage))
return;

MidiMessage thruMessage = mThruMapCallback(mMessage);
Expand Down

0 comments on commit 6bdb707

Please sign in to comment.