Fix issue #13 on GitHub.
This commit is contained in:
		
							parent
							
								
									d13353a5b6
								
							
						
					
					
						commit
						6164e2c5fe
					
				
							
								
								
									
										28
									
								
								src/MIDI.hpp
								
								
								
								
							
							
						
						
									
										28
									
								
								src/MIDI.hpp
								
								
								
								
							|  | @ -483,24 +483,22 @@ inline 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()) |     if (!parse()) | ||||||
|  |         return false; | ||||||
|  | 
 | ||||||
|  |     handleNullVelocityNoteOnAsNoteOff(); | ||||||
|  |     const bool channelMatch = inputFilter(inChannel); | ||||||
|  | 
 | ||||||
|  |     if (MIDI_USE_CALLBACKS && channelMatch) | ||||||
|     { |     { | ||||||
|         handleNullVelocityNoteOnAsNoteOff(); |         launchCallback(); | ||||||
|         if (inputFilter(inChannel)) |  | ||||||
|         { |  | ||||||
| 
 |  | ||||||
| #if (MIDI_BUILD_OUTPUT && MIDI_BUILD_THRU) |  | ||||||
|             thruFilter(inChannel); |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| #if MIDI_USE_CALLBACKS |  | ||||||
|             launchCallback(); |  | ||||||
| #endif |  | ||||||
|             return true; |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return false; | #if MIDI_BUILD_THRU | ||||||
|  |     thruFilter(inChannel); | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
|  |     return channelMatch; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // -----------------------------------------------------------------------------
 | // -----------------------------------------------------------------------------
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Francois Best
						Francois Best