| 649 | } |
| 650 | |
| 651 | void EqualizationUI::UpdateGraphic() |
| 652 | { |
| 653 | auto ¶meters = 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 | |
| 693 | void EqualizationUI::OnSize(wxSizeEvent & event) |
| 694 | { |
nothing calls this directly
no test coverage detected