Fix instrument release ending one frame early

See discussion in https://github.com/LMMS/lmms/pull/6908#issuecomment-1784637574
and following comments.
This commit is contained in:
Lukas W
2023-10-31 20:25:55 +01:00
parent bf5f4a7994
commit d277916c01

View File

@@ -188,7 +188,7 @@ void Instrument::applyRelease( sampleFrame * buf, const NotePlayHandle * _n )
(std::max(fpp - desiredReleaseFrames(), 0) +
fl) % fpp : 0); f < frames; ++f)
{
const float fac = (float)( fl-f-1 ) /
const float fac = (float)( fl-f ) /
desiredReleaseFrames();
for( ch_cnt_t ch = 0; ch < DEFAULT_CHANNELS; ++ch )
{