Skip to content

Commit

Permalink
Fix crash if processing too much without a control update
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 30, 2022
1 parent 52e0a19 commit 20d6275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/Nekobi/nekobee-src/nekobee_voice_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ nekobee_voice_render(nekobee_synth_t *synth, nekobee_voice_t *voice,

osc_index += sample_count;

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

0 comments on commit 20d6275

Please sign in to comment.