Skip to content

Commit 20d6275

Browse files
committed
Fix crash if processing too much without a control update
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 52e0a19 commit 20d6275

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/Nekobi/nekobee-src/nekobee_voice_render.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ nekobee_voice_render(nekobee_synth_t *synth, nekobee_voice_t *voice,
376376

377377
osc_index += sample_count;
378378

379-
if (do_control_update) {
379+
if (do_control_update || osc_index > MINBLEP_BUFFER_LENGTH - (XSYNTH_NUGGET_SIZE + LONGEST_DD_PULSE_LENGTH)) {
380380
/* do those things should be done only once per control-calculation
381381
* interval ("nugget"), such as voice check-for-dead, pitch envelope
382382
* calculations, volume envelope phase transition checks, etc. */

0 commit comments

Comments
 (0)