Some attention on peak controller

This commit is contained in:
Vesa
2014-10-31 17:46:11 +02:00
parent 8a596b0898
commit f207613d5f
3 changed files with 30 additions and 14 deletions

View File

@@ -131,7 +131,7 @@ bool PeakControllerEffect::processAudioBuffer( sampleFrame * _buf,
float curRMS = sqrt_neg( sum / _frames );
const float amount = c.m_amountModel.value() * c.m_amountMultModel.value();
m_lastSample = c.m_baseModel.value() + amount * curRMS;
m_lastSample = qBound( 0.0f, c.m_baseModel.value() + amount * curRMS, 1.0f );
return isRunning();
}