No need for channel info when parsing.

This commit is contained in:
Francois Best 2013-07-06 15:53:40 +02:00
parent 6fbc9bd5a7
commit 1d10ce0a46
2 changed files with 6 additions and 6 deletions

View File

@ -118,7 +118,7 @@ public:
private: private:
bool inputFilter(Channel inChannel); bool inputFilter(Channel inChannel);
bool parse(Channel inChannel); bool parse();
void resetInput(); void resetInput();
private: private:

View File

@ -470,7 +470,7 @@ bool MidiInterface<SerialPort>::read(Channel inChannel)
if (inChannel >= MIDI_CHANNEL_OFF) if (inChannel >= MIDI_CHANNEL_OFF)
return false; // MIDI Input disabled. return false; // MIDI Input disabled.
if (parse(inChannel)) if (parse())
{ {
if (inputFilter(inChannel)) if (inputFilter(inChannel))
{ {
@ -493,8 +493,8 @@ bool MidiInterface<SerialPort>::read(Channel inChannel)
// Private method: MIDI parser // Private method: MIDI parser
template<class SerialPort> template<class SerialPort>
bool MidiInterface<SerialPort>::parse(Channel inChannel) bool MidiInterface<SerialPort>::parse()
{ {
const byte bytes_available = mSerial.available(); const byte bytes_available = mSerial.available();
if (bytes_available == 0) if (bytes_available == 0)
@ -624,7 +624,7 @@ bool MidiInterface<SerialPort>::parse(Channel inChannel)
#else #else
// Call the parser recursively // Call the parser recursively
// to parse the rest of the message. // to parse the rest of the message.
return parse(inChannel); return parse();
#endif #endif
} }
@ -762,7 +762,7 @@ bool MidiInterface<SerialPort>::parse(Channel inChannel)
#else #else
// Call the parser recursively // Call the parser recursively
// to parse the rest of the message. // to parse the rest of the message.
return parse(inChannel); return parse();
#endif #endif
} }
} }