1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +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);
wxString text = GetRange(lpos, pos);
if (text[0] == wxT('(')) {
wxLongToLongHashMap::const_iterator left = mLeftParens.find(lpos);
if (left != mLeftParens.end()) {
Colorize(lpos, left->second);
if (text.Length() > 0) {
if (text[0] == wxT('(')) {
wxLongToLongHashMap::const_iterator left = mLeftParens.find(lpos);
if (left != mLeftParens.end()) {
Colorize(lpos, left->second);
}
}
}
else if (text[0] == wxT(')')) {
wxLongToLongHashMap::const_iterator right = mRightParens.find(lpos);
if (right != mRightParens.end()) {
Colorize(right->second, lpos);
else if (text[0] == wxT(')')) {
wxLongToLongHashMap::const_iterator right = mRightParens.find(lpos);
if (right != mRightParens.end()) {
Colorize(right->second, lpos);
}
}
}

View File

@ -1567,11 +1567,12 @@ void EffectEqualization::setCurve(int currentCurve)
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;
if(when <= 1)
if(when <= 1.)
env->Insert(when, value);
else
{ // we have a point beyond fs/2. Insert it so that env code can use it.