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

Method OnLinFreq

src/effects/EqualizationUI.cpp:819–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817}
818
819void EqualizationUI::OnLinFreq(wxCommandEvent & WXUNUSED(event))
820{
821 auto &parameters = mCurvesList.mParameters;
822 auto &lin = parameters.mLin;
823 const auto &loFreq = parameters.mLoFreq;
824 const auto &hiFreq = parameters.mHiFreq;
825
826 lin = mLinFreq->IsChecked();
827 if(parameters.IsLinear()) //going from log to lin freq scale
828 {
829 mFreqRuler->ruler.SetUpdater(&LinearUpdater::Instance());
830 mFreqRuler->ruler.SetRange(0, hiFreq);
831 mBands.EnvLogToLin();
832 lin = true;
833 }
834 else //going from lin to log freq scale
835 {
836 mFreqRuler->ruler.SetUpdater(&LogarithmicUpdater::Instance());
837 mFreqRuler->ruler.SetRange(loFreq, hiFreq);
838 mBands.EnvLinToLog();
839 lin = false;
840 }
841 mFreqRuler->Refresh(false);
842 mCurvesList.ForceRecalc();
843}
844
845void EqualizationUI::OnIdle(wxIdleEvent &event)
846{

Callers

nothing calls this directly

Calls 8

IsCheckedMethod · 0.80
SetUpdaterMethod · 0.80
EnvLogToLinMethod · 0.80
EnvLinToLogMethod · 0.80
InstanceClass · 0.50
IsLinearMethod · 0.45
SetRangeMethod · 0.45
RefreshMethod · 0.45

Tested by

no test coverage detected