mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-22 23:19:42 +02:00
Improve the way that EQ curves with points beyond fs/2 are handled, making use of Envelope code. Why didn't I think of this before? :-)
This commit is contained in:
parent
885f83a606
commit
500c84fe5d
@ -1655,7 +1655,12 @@ void EqualizationDialog::setCurve(int currentCurve)
|
||||
if(when <= 1)
|
||||
env->Insert(when, value);
|
||||
else
|
||||
{ // we have a point beyond fs/2. Insert it so that env code can use it.
|
||||
// but just this one, we have no use for the rest
|
||||
env->SetTrackLen(when); // can't Insert if the envelope isn't long enough
|
||||
env->Insert(when, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ //get the first point as close as we can to the last point requested
|
||||
@ -1665,13 +1670,6 @@ void EqualizationDialog::setCurve(int currentCurve)
|
||||
mLogEnvelope->Insert(0., mCurves[currentCurve].points[i].dB);
|
||||
}
|
||||
}
|
||||
if ( i != nCurvePoints)
|
||||
{
|
||||
when = 1.;
|
||||
value = mCurves[currentCurve].points[nCurvePoints-1].dB;
|
||||
env->Insert(when, value);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(changed) // not all points were loaded so switch to unnamed
|
||||
|
Loading…
x
Reference in New Issue
Block a user