1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-14 15:48:21 +02:00
This commit is contained in:
David Bailes 2015-08-27 15:43:26 +01:00
commit 2a4a9c7c72
2 changed files with 15 additions and 13 deletions

View File

@ -326,17 +326,18 @@ void NyqTextCtrl::OnUpdate(wxUpdateUIEvent & e)
int lpos = wxMax(0, pos - 1); int lpos = wxMax(0, pos - 1);
wxString text = GetRange(lpos, pos); wxString text = GetRange(lpos, pos);
if (text.Length() > 0) {
if (text[0] == wxT('(')) { if (text[0] == wxT('(')) {
wxLongToLongHashMap::const_iterator left = mLeftParens.find(lpos); wxLongToLongHashMap::const_iterator left = mLeftParens.find(lpos);
if (left != mLeftParens.end()) { if (left != mLeftParens.end()) {
Colorize(lpos, left->second); Colorize(lpos, left->second);
}
} }
} else if (text[0] == wxT(')')) {
else if (text[0] == wxT(')')) { wxLongToLongHashMap::const_iterator right = mRightParens.find(lpos);
wxLongToLongHashMap::const_iterator right = mRightParens.find(lpos); if (right != mRightParens.end()) {
if (right != mRightParens.end()) { Colorize(right->second, lpos);
Colorize(right->second, lpos); }
} }
} }

View File

@ -1567,11 +1567,12 @@ void EffectEqualization::setCurve(int currentCurve)
for(i=0;i<nCurvePoints;i++) for(i=0;i<nCurvePoints;i++)
{ {
if( mCurves[currentCurve].points[i].Freq >= 20) double flog = log10(mCurves[currentCurve].points[i].Freq);
if( flog >= loLog )
{ {
when = (log10(mCurves[currentCurve].points[i].Freq) - loLog)/denom; when = (flog - loLog)/denom;
value = mCurves[currentCurve].points[i].dB; value = mCurves[currentCurve].points[i].dB;
if(when <= 1) if(when <= 1.)
env->Insert(when, value); env->Insert(when, value);
else else
{ // we have a point beyond fs/2. Insert it so that env code can use it. { // we have a point beyond fs/2. Insert it so that env code can use it.