diff --git a/src/midi.c b/src/midi.c index 4df5831..cd2c5d5 100644 --- a/src/midi.c +++ b/src/midi.c @@ -933,7 +933,7 @@ void midi_tick(void) if (state->midiChannel == chan && state->noteOn) { u8 pitch = state->pitch; - signed char cents = state->cents; + s8 cents = state->cents; if (midiChannel->glideTargetPitch > pitch) { cents += 10; @@ -945,8 +945,8 @@ void midi_tick(void) state->ops->pitch(state->number, pitch, cents); state->pitch = pitch; state->cents = cents; - } else if (midiChannel->glideTargetPitch < pitch || (midiChannel->glideTargetPitch - == pitch && cents > 0)) { + } else if (midiChannel->glideTargetPitch < pitch + || (midiChannel->glideTargetPitch == pitch && cents > 0)) { cents -= 10; if (cents == -10) { pitch--; diff --git a/src/midi.h b/src/midi.h index f65f92f..9cb6d28 100644 --- a/src/midi.h +++ b/src/midi.h @@ -140,7 +140,7 @@ typedef struct DeviceChannel { u8 volume; u8 pan; u16 pitchBend; - signed char cents; + s8 cents; } DeviceChannel; void midi_init(const FmChannel** defaultPresets, const PercussionPreset** defaultPercussionPresets, diff --git a/tests/Makefile b/tests/Makefile index b28c5d8..0a3c043 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -32,7 +32,8 @@ CFLAGS=$(INCLUDE_DIRS) \ -Wno-char-subscripts \ -Wno-unused-parameter \ -Wno-builtin-declaration-mismatch \ - -Wno-unused-function + -Wno-unused-function \ + -fsigned-char # list of function signature to mock MOCKS=midi_process \