Small fix to envelope operations in Equalization user interface

This commit is contained in:
Paul Licameli 2017-05-06 10:05:06 -04:00
parent 7ad910c0a6
commit e36070e671
1 changed files with 2 additions and 1 deletions

View File

@ -1671,9 +1671,10 @@ void EffectEqualization::setCurve(int currentCurve)
value = mCurves[currentCurve].points[pointCount].dB;
if(when <= 1) {
env->InsertOrReplace(when, value);
if (when == 1)
break;
}
else {
// There are more points at higher freqs, so interpolate next one then stop.
when = 1.0;
double lastF = mCurves[currentCurve].points[pointCount-1].Freq;
double nextF = mCurves[currentCurve].points[pointCount].Freq;