Skip to content

Commit

Permalink
Fix modLfoToVol behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Sep 8, 2024
1 parent 7f39048 commit f79af51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/fluid_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ fluid_cb2amp(fluid_real_t cb)
/* minimum attenuation: 0 dB */
if(cb < 0)
{
return 1.0;
/* Issue #1374: it seems that by using modLfoToVolEnv, the attenuation can become negative and
* therefore the signal needs to be amplified.
* In such a rare case, calculate the attenuation on the fly.
*/
return FULID_POW(10.0f, cb / -200.0f);
}

if(cb >= FLUID_CB_AMP_SIZE)
Expand Down

0 comments on commit f79af51

Please sign in to comment.