Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a regression introduced by #1314 #1381

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/rvoice/fluid_rvoice.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ fluid_rvoice_write(fluid_rvoice_t *voice, fluid_real_t *dsp_buf)
/******************* amplitude **********************/

count = fluid_rvoice_calc_amp(voice);
if(count == 0)
{
// Voice has finished, remove from dsp loop
return 0;
}
// else if count is negative, still process the voice


/******************* phase **********************/
Expand Down Expand Up @@ -427,7 +433,7 @@ fluid_rvoice_write(fluid_rvoice_t *voice, fluid_real_t *dsp_buf)
* Depending on the position in the loop and the loop size, this
* may require several runs. */

if(count <= 0)
if(count < 0)
{
// The voice is quite, i.e. either in delay phase or zero volume.
// We need to update the rvoice's dsp phase, as the delay phase shall not "postpone" the sound, rather
Expand Down
Loading