Removed compile flags and last preprocessor settings.

This commit is contained in:
Francois Best 2014-06-11 09:14:03 +02:00
parent b1b978d63c
commit 3dc0f30e16
2 changed files with 12 additions and 23 deletions

View File

@ -30,7 +30,6 @@ template<class SerialPort, class Settings>
inline MidiInterface<SerialPort, Settings>::MidiInterface(SerialPort& inSerial) inline MidiInterface<SerialPort, Settings>::MidiInterface(SerialPort& inSerial)
: mSerial(inSerial) : mSerial(inSerial)
{ {
#if MIDI_BUILD_INPUT && MIDI_USE_CALLBACKS
mNoteOffCallback = 0; mNoteOffCallback = 0;
mNoteOnCallback = 0; mNoteOnCallback = 0;
mAfterTouchPolyCallback = 0; mAfterTouchPolyCallback = 0;
@ -49,7 +48,6 @@ inline MidiInterface<SerialPort, Settings>::MidiInterface(SerialPort& inSerial)
mStopCallback = 0; mStopCallback = 0;
mActiveSensingCallback = 0; mActiveSensingCallback = 0;
mSystemResetCallback = 0; mSystemResetCallback = 0;
#endif
} }
/*! \brief Destructor for MidiInterface. /*! \brief Destructor for MidiInterface.
@ -476,7 +474,7 @@ inline bool MidiInterface<SerialPort, Settings>::read(Channel inChannel)
handleNullVelocityNoteOnAsNoteOff(); handleNullVelocityNoteOnAsNoteOff();
const bool channelMatch = inputFilter(inChannel); const bool channelMatch = inputFilter(inChannel);
if (MIDI_USE_CALLBACKS && channelMatch) if (channelMatch)
{ {
launchCallback(); launchCallback();
} }
@ -616,15 +614,17 @@ bool MidiInterface<SerialPort, Settings>::parse()
mPendingMessageIndex++; mPendingMessageIndex++;
} }
#if USE_1BYTE_PARSING if (Settings::Use1ByteParsing)
// Message is not complete. {
return false; // Message is not complete.
#else return false;
// Call the parser recursively }
// to parse the rest of the message. else
return parse(); {
#endif // Call the parser recursively
// to parse the rest of the message.
return parse();
}
} }
else else
{ {

View File

@ -25,17 +25,6 @@
#include "midi_Defs.h" #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 BEGIN_MIDI_NAMESPACE
/*! \brief Default Settings Traits struct /*! \brief Default Settings Traits struct