diff options
| author | Leon Scheid <leon@weingut-scheid.de> | 2019-11-22 15:40:11 +0100 | 
|---|---|---|
| committer | Leon Scheid <leon@weingut-scheid.de> | 2019-11-22 15:40:11 +0100 | 
| commit | 1aa8b88a1df5539fa7ad4004cfcbf3b8438486b4 (patch) | |
| tree | 1d5606d3589bb4ef18ecc863c8ec3e371f46d694 | |
| parent | ef80d253e446fdf94638d235b2c557473a1e0f5d (diff) | |
| download | midimonster-1aa8b88a1df5539fa7ad4004cfcbf3b8438486b4.tar.gz midimonster-1aa8b88a1df5539fa7ad4004cfcbf3b8438486b4.tar.bz2 midimonster-1aa8b88a1df5539fa7ad4004cfcbf3b8438486b4.zip | |
Remove unnecessary case
| -rw-r--r-- | backends/midi.c | 13 | 
1 files changed, 5 insertions, 8 deletions
| diff --git a/backends/midi.c b/backends/midi.c index d609ad9..cde278b 100644 --- a/backends/midi.c +++ b/backends/midi.c @@ -259,20 +259,17 @@ static int midi_handle(size_t num, managed_fd* fds){  		ident.label = 0;  		switch(ev->type){  			case SND_SEQ_EVENT_NOTEON: -				ident.fields.type = note; -				ident.fields.channel = ev->data.note.channel; -				ident.fields.control = ev->data.note.note; -				val.normalised = (double)ev->data.note.velocity / 127.0; -				event_type = "note"; -				break;  			case SND_SEQ_EVENT_NOTEOFF: +			case SND_SEQ_EVENT_NOTE:  				ident.fields.type = note;  				ident.fields.channel = ev->data.note.channel;  				ident.fields.control = ev->data.note.note; -				val.normalised = (double)0; +				val.normalised = (double)ev->data.note.velocity / 127.0; +				if(ev->type == SND_SEQ_EVENT_NOTEOFF){ +   					val.normalised = 0; +				}  				event_type = "note";  				break; -			case SND_SEQ_EVENT_NOTE:  			case SND_SEQ_EVENT_KEYPRESS:  				ident.fields.type = pressure;  				ident.fields.channel = ev->data.note.channel; | 
