MCPcopy Create free account
hub / github.com/audacity/audacity / UpdateGraphic

Method UpdateGraphic

src/effects/EqualizationUI.cpp:651–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651void EqualizationUI::UpdateGraphic()
652{
653 auto &parameters = mCurvesList.mParameters;
654 const auto &lin = parameters.mLin;
655 auto &linEnvelope = parameters.mLinEnvelope;
656 auto &logEnvelope = parameters.mLogEnvelope;
657 const auto &loFreq = parameters.mLoFreq;
658 const auto &hiFreq = parameters.mHiFreq;
659
660 auto &drawMode = parameters.mDrawMode;
661
662 if(lin) //going from lin to log freq scale - do not use IsLinear() here
663 { // add some extra points to the linear envelope for the graphic to follow
664 double step = pow(2., 1./12.); // twelve steps per octave
665 double when,value;
666 for(double freq=10.; freq<hiFreq; freq*=step)
667 {
668 when = freq/hiFreq;
669 value = linEnvelope.GetValue(when);
670 linEnvelope.Insert(when, value);
671 }
672
673 mBands.EnvLinToLog();
674 mFreqRuler->ruler.SetUpdater(&LogarithmicUpdater::Instance());
675 mFreqRuler->ruler.SetRange(loFreq, hiFreq);
676 }
677
678 mBands.ErrMin(); //move sliders to minimise error
679
680 szrV->Show(szrG,true); // eq sliders
681 szrH->Show(szrI,mOptions == kEqLegacy ); // interpolation choice
682 szrH->Show(szrL,false); // linear freq checkbox
683
684 mUIParent->Layout();
685 wxGetTopLevelParent(mUIParent)->Layout();
686 mUIParent->Layout();
687 wxGetTopLevelParent(mUIParent)->Layout();
688
689 mBands.GraphicEQ(logEnvelope);
690 drawMode = false;
691}
692
693void EqualizationUI::OnSize(wxSizeEvent & event)
694{

Callers

nothing calls this directly

Calls 10

EnvLinToLogMethod · 0.80
SetUpdaterMethod · 0.80
ErrMinMethod · 0.80
GraphicEQMethod · 0.80
InstanceClass · 0.50
GetValueMethod · 0.45
InsertMethod · 0.45
SetRangeMethod · 0.45
ShowMethod · 0.45
LayoutMethod · 0.45

Tested by

no test coverage detected