From: kazu Date: Sat, 13 Apr 2024 04:29:27 +0000 (+0000) Subject: Maybe this prevent crash? (idk) X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d58a0d83f0b94c1291056111f453434b380a1b79;p=ksynth.git Maybe this prevent crash? (idk) git-svn-id: file:///raid/svn-main/kazu-ksynth/trunk@19 7b47e76f-e598-2f43-bc14-414d160cc389 --- 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; } }