-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Bug Summary
From plugins/CrossoverEQ/CrossoverEQ.cpp:
const float d = dryLevel();
const float w = wetLevel();
double outSum = 0.0;
for( int f = 0; f < frames; ++f )
{
outSum = buf[f][0] * buf[f][0] + buf[f][1] * buf[f][1];
buf[f][0] = d * buf[f][0] + w * m_work[f][0];
buf[f][1] = d * buf[f][1] + w * m_work[f][1];
}
checkGate( outSum );
There are at least 2 bugs in this calculation:
- It seems to calculate outSum incorrectly - it's assigned rather than incremented in the loop, so only the last sample is actually checked. (Thanks to @DomClark for reporting)
outSum
must be divided byframes
in the end. (caused by Effect::checkGate should have a more descriptive comment #5460)
Steps to reproduce
Unclear
Expected behavior
Unclear
Actual behavior
Unclear. It could lead to too early or to late stopping of effect processing, and thus to clipping.
Affected LMMS versions
all