diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/midi/base.c | 2 | ||||
-rw-r--r-- | Alc/midi/sf2load.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c index fbf02556..cab85c1a 100644 --- a/Alc/midi/base.c +++ b/Alc/midi/base.c @@ -16,6 +16,8 @@ #include "alu.h" +extern inline ALboolean IsValidCtrlInput(int cc); + extern inline size_t Reader_read(Reader *self, void *buf, size_t len); diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 3c81b256..933166ad 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -614,11 +614,8 @@ static ALenum getModSrcInput(int input) if(input == 16) return AL_PITCHBEND_SENSITIVITY_SOFT; if((input&0x80)) { - input ^= 0x80; - if(input > 0 && input < 120 && !(input == 6 || (input >= 32 && input <= 63) || - (input >= 98 && input <= 101))) - return input; - input ^= 0x80; + if(IsValidCtrlInput(input^0x80)) + return input^0x80; } ERR("Unhandled modulator source input: 0x%02x\n", input); return AL_INVALID; |