diff --git a/src/MIDI.hpp b/src/MIDI.hpp index e6413f6..0d4e347 100644 --- a/src/MIDI.hpp +++ b/src/MIDI.hpp @@ -30,7 +30,6 @@ template inline MidiInterface::MidiInterface(SerialPort& inSerial) : mSerial(inSerial) { -#if MIDI_BUILD_INPUT && MIDI_USE_CALLBACKS mNoteOffCallback = 0; mNoteOnCallback = 0; mAfterTouchPolyCallback = 0; @@ -49,7 +48,6 @@ inline MidiInterface::MidiInterface(SerialPort& inSerial) mStopCallback = 0; mActiveSensingCallback = 0; mSystemResetCallback = 0; -#endif } /*! \brief Destructor for MidiInterface. @@ -476,7 +474,7 @@ inline bool MidiInterface::read(Channel inChannel) handleNullVelocityNoteOnAsNoteOff(); const bool channelMatch = inputFilter(inChannel); - if (MIDI_USE_CALLBACKS && channelMatch) + if (channelMatch) { launchCallback(); } @@ -616,15 +614,17 @@ bool MidiInterface::parse() mPendingMessageIndex++; } - #if USE_1BYTE_PARSING - // Message is not complete. - return false; - #else - // Call the parser recursively - // to parse the rest of the message. - return parse(); - #endif - + if (Settings::Use1ByteParsing) + { + // Message is not complete. + return false; + } + else + { + // Call the parser recursively + // to parse the rest of the message. + return parse(); + } } else { diff --git a/src/midi_Settings.h b/src/midi_Settings.h index 43f6880..fccb99d 100644 --- a/src/midi_Settings.h +++ b/src/midi_Settings.h @@ -25,17 +25,6 @@ #include "midi_Defs.h" -// Compilation flags. Set them to 1 to build the associated feature -// (MIDI in, out, thru), or to 0 to disable the feature and save space. -// Note that thru can work only if input and output are enabled. - -#define MIDI_BUILD_INPUT 1 -#define MIDI_BUILD_OUTPUT 1 -#define MIDI_BUILD_THRU 1 -#define MIDI_USE_CALLBACKS 1 - -// ----------------------------------------------------------------------------- - BEGIN_MIDI_NAMESPACE /*! \brief Default Settings Traits struct