Cleanup & init'd thru.
This commit is contained in:
parent
8eb881f39e
commit
8ebd4f9161
30
src/MIDI.h
30
src/MIDI.h
|
|
@ -152,8 +152,7 @@ public:
|
|||
public:
|
||||
static inline MidiType getTypeFromStatusByte(byte inStatus);
|
||||
static inline Channel getChannelFromStatusByte(byte inStatus);
|
||||
static inline bool isChannelMessage(MidiType inType);
|
||||
|
||||
static inline bool isChannelMessage(MidiType inType);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Input Callbacks
|
||||
|
|
@ -222,10 +221,6 @@ private:
|
|||
inline bool inputFilter(Channel inChannel);
|
||||
inline void resetInput();
|
||||
|
||||
private:
|
||||
bool mThruActivated : 1;
|
||||
MidiFilterMode mThruFilterMode : 7;
|
||||
|
||||
private:
|
||||
typedef Message<Settings::SysExMaxSize> MidiMessage;
|
||||
|
||||
|
|
@ -233,15 +228,18 @@ private:
|
|||
SerialPort& mSerial;
|
||||
|
||||
private:
|
||||
Channel mInputChannel;
|
||||
StatusByte mRunningStatus_RX;
|
||||
StatusByte mRunningStatus_TX;
|
||||
byte mPendingMessage[3];
|
||||
unsigned mPendingMessageExpectedLenght;
|
||||
unsigned mPendingMessageIndex;
|
||||
unsigned mCurrentRpnNumber;
|
||||
unsigned mCurrentNrpnNumber;
|
||||
MidiMessage mMessage;
|
||||
Channel mInputChannel;
|
||||
StatusByte mRunningStatus_RX;
|
||||
StatusByte mRunningStatus_TX;
|
||||
byte mPendingMessage[3];
|
||||
unsigned mPendingMessageExpectedLenght;
|
||||
unsigned mPendingMessageIndex;
|
||||
unsigned mCurrentRpnNumber;
|
||||
unsigned mCurrentNrpnNumber;
|
||||
bool mThruActivated : 1;
|
||||
MidiFilterMode mThruFilterMode : 7;
|
||||
MidiMessage mMessage;
|
||||
|
||||
|
||||
private:
|
||||
inline StatusByte getStatus(MidiType inType,
|
||||
|
|
@ -255,6 +253,4 @@ unsigned decodeSysEx(const byte* inSysEx, byte* outData, unsigned inLenght);
|
|||
|
||||
END_MIDI_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include "MIDI.hpp"
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ inline MidiInterface<SerialPort, Settings>::MidiInterface(SerialPort& inSerial)
|
|||
, mPendingMessageIndex(0)
|
||||
, mCurrentRpnNumber(0xffff)
|
||||
, mCurrentNrpnNumber(0xffff)
|
||||
, mThruActivated(true)
|
||||
, mThruFilterMode(Full)
|
||||
{
|
||||
mNoteOffCallback = 0;
|
||||
mNoteOnCallback = 0;
|
||||
|
|
@ -781,9 +783,14 @@ bool MidiInterface<SerialPort, Settings>::parse()
|
|||
|
||||
// Save data2 only if applicable
|
||||
if (mPendingMessageExpectedLenght == 3)
|
||||
{
|
||||
// todo: This code seems unreacheable, to clean up.
|
||||
mMessage.data2 = mPendingMessage[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
mMessage.data2 = 0;
|
||||
}
|
||||
|
||||
mPendingMessageIndex = 0;
|
||||
mPendingMessageExpectedLenght = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue