From d58a0d83f0b94c1291056111f453434b380a1b79 Mon Sep 17 00:00:00 2001 From: kazu Date: Sat, 13 Apr 2024 04:29:27 +0000 Subject: [PATCH] Maybe this prevent crash? (idk) git-svn-id: file:///raid/svn-main/kazu-ksynth/trunk@19 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 5cde7b0..40a6338 100644 --- a/src/ksynth.c +++ b/src/ksynth.c @@ -119,7 +119,7 @@ void ksynth_note_off(struct KSynth* ksynth_instance, unsigned char channel, unsi ksynth_instance->polyphony--; ksynth_instance->polyphony_per_channel[channel]--; - i--; + break; } } } @@ -247,7 +247,7 @@ float* ksynth_generate_buffer(struct KSynth* ksynth_instance, unsigned short buf ksynth_instance->polyphony--; - i--; // Since we removed a voice, adjust the index + break; } } -- 2.43.0