From 6274e0a6aee3b52b45e3154d04ee8a0d0fdb6514 Mon Sep 17 00:00:00 2001 From: kazu Date: Sun, 7 Apr 2024 10:18:34 +0000 Subject: [PATCH] Fixed channel 15 not playing bug git-svn-id: file:///raid/svn-main/kazu-ksynth/trunk@11 7b47e76f-e598-2f43-bc14-414d160cc389 --- src/ksynth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ksynth.c b/src/ksynth.c index f00bdd3..a58426a 100644 --- a/src/ksynth.c +++ b/src/ksynth.c @@ -67,7 +67,7 @@ struct KSynth* ksynth_new(const char* sample_file_path, int sample_rate, int num } void ksynth_note_on(struct KSynth* ksynth_instance, int channel, int note, int velocity) { - if(ksynth_instance == NULL || channel < 0 || channel > 15 || note < 0 || note > 127 || velocity < 0 || velocity > 127) { + if(ksynth_instance == NULL || channel < 0 || channel > 16 || note < 0 || note > 127 || velocity < 0 || velocity > 127) { fprintf(stderr, "[KSynth] Error: Invalid parameters for note on.\n"); return; } @@ -101,7 +101,7 @@ void ksynth_note_on(struct KSynth* ksynth_instance, int channel, int note, int v } void ksynth_note_off(struct KSynth* ksynth_instance, int channel, int note) { - if (ksynth_instance == NULL || channel < 0 || channel > 15 || note < 0 || note > 127) { + if (ksynth_instance == NULL || channel < 0 || channel > 16 || note < 0 || note > 127) { fprintf(stderr, "[KSynth] Error: Invalid parameters for note off.\n"); return; } -- 2.43.0