Cleanup & init'd thru.
This commit is contained in:
		
							parent
							
								
									8eb881f39e
								
							
						
					
					
						commit
						8ebd4f9161
					
				
							
								
								
									
										10
									
								
								src/MIDI.h
								
								
								
								
							
							
						
						
									
										10
									
								
								src/MIDI.h
								
								
								
								
							|  | @ -154,7 +154,6 @@ public: | |||
|     static inline Channel getChannelFromStatusByte(byte inStatus); | ||||
|     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; | ||||
| 
 | ||||
|  | @ -241,8 +236,11 @@ private: | |||
|     unsigned        mPendingMessageIndex; | ||||
|     unsigned        mCurrentRpnNumber; | ||||
|     unsigned        mCurrentNrpnNumber; | ||||
|     bool            mThruActivated  : 1; | ||||
|     MidiFilterMode  mThruFilterMode : 7; | ||||
|     MidiMessage     mMessage; | ||||
| 
 | ||||
| 
 | ||||
| private: | ||||
|     inline StatusByte getStatus(MidiType inType, | ||||
|                                 Channel inChannel) const; | ||||
|  | @ -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
	
	 Francois Best
						Francois Best