commit 96c6462105540119124a1779ead5124cc9ed33c0
parent 9249e7c0c0ec81af93c85cf2c686ebbd2e6f6340
Author: PawelKapl <[email protected]>
Date: Mon, 17 Apr 2023 04:33:55 +0200
Hide normalization toggle for model without loudness param (#192)
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
@@ -2,6 +2,7 @@
xcuserdata
*.RPP-bak
build-*
+.idea/
*.ipch
*.db
diff --git a/NeuralAmpModeler/NeuralAmpModeler.cpp b/NeuralAmpModeler/NeuralAmpModeler.cpp
@@ -349,7 +349,7 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
IVSlideSwitchControl* outputNormSlider = new IVSlideSwitchControl(outNormToggleArea, kOutNorm, "Normalize", style,
true, // valueInButton
EDirection::Horizontal);
- pGraphics->AttachControl(outputNormSlider);
+ pGraphics->AttachControl(outputNormSlider, kOutNorm);
// The knobs
// Input
@@ -645,6 +645,8 @@ void NeuralAmpModeler::_ApplyDSPStaging()
// Move from staged to active DSP
this->mNAM = std::move(this->mStagedNAM);
this->mStagedNAM = nullptr;
+ // Disable Normalization toggle when no loudness data in model metadata
+ GetUI()->GetControlWithTag(kOutNorm)->SetDisabled(!mNAM->HasLoudness());
}
if (this->mStagedIR != nullptr)
{