uses Transport::thruActivated for initial thru state

This commit is contained in:
Eric Sherman 2021-08-06 10:41:05 -04:00 committed by Francois Best
parent 1fe67bec4f
commit 4469f2aa7f
1 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings,
mMessage.data2 = 0; mMessage.data2 = 0;
mMessage.length = 0; mMessage.length = 0;
mThruFilterCallback = thruOn; mThruFilterCallback = Transport::thruActivated ? thruOn : thruOff;
mThruMapCallback = thruEcho; mThruMapCallback = thruEcho;
return *this; return *this;
} }
@ -1421,7 +1421,7 @@ inline MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Se
template<class Transport, class Settings, class Platform> template<class Transport, class Settings, class Platform>
void MidiInterface<Transport, Settings, Platform>::processThru() void MidiInterface<Transport, Settings, Platform>::processThru()
{ {
if (!mThruFilterCallback(mMessage)) if (!Transport::thruActivated || !mThruFilterCallback(mMessage))
return; return;
MidiMessage thruMessage = mThruMapCallback(mMessage); MidiMessage thruMessage = mThruMapCallback(mMessage);