]> Nishi Git Mirror - ksynth.git/commitdiff
Maybe this prevent crash? (idk)
authorkazu <kazu@7b47e76f-e598-2f43-bc14-414d160cc389>
Sat, 13 Apr 2024 04:29:27 +0000 (04:29 +0000)
committerkazu <kazu@7b47e76f-e598-2f43-bc14-414d160cc389>
Sat, 13 Apr 2024 04:29:27 +0000 (04:29 +0000)
git-svn-id: file:///raid/svn-main/kazu-ksynth/trunk@19 7b47e76f-e598-2f43-bc14-414d160cc389

src/ksynth.c

index 5cde7b0acf33000e8bf7250d275c60f3238a8987..40a63389799b3d2194765af7532ae856216f3a13 100644 (file)
@@ -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;
                }
        }