@@ -164,9 +164,6 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
164164
165165 // Misc Areas
166166 const auto helpButtonArea = mainArea.GetFromTRHC (50 , 50 ).GetCentredInside (20 , 20 );
167- // Making it centered under the big title
168- const auto sampleRateWarningArea = titleArea.GetFromBottom (16 .f ).GetTranslated (117 .f , 6 .f ).GetFromLeft (300 .f );
169- // modelArea.GetFromBottom(16.f).GetTranslated(12.f, 16.f).GetFromLeft(300.f);
170167
171168 // Model loader button
172169 auto loadModelCompletionHandler = [&](const WDL_String& fileName, const WDL_String& path) {
@@ -223,7 +220,8 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
223220 new NAMFileBrowserControl (irArea, kMsgTagClearIR , defaultIRString.c_str (), " wav" , loadIRCompletionHandler, style,
224221 fileSVG, crossSVG, leftArrowSVG, rightArrowSVG, fileBackgroundBitmap),
225222 kCtrlTagIRFileBrowser );
226- pGraphics->AttachControl (new NAMSwitchControl (ngToggleArea, kNoiseGateActive , " Noise Gate" , style, switchHandleBitmap));
223+ pGraphics->AttachControl (
224+ new NAMSwitchControl (ngToggleArea, kNoiseGateActive , " Noise Gate" , style, switchHandleBitmap));
227225 pGraphics->AttachControl (new NAMSwitchControl (eqToggleArea, kEQActive , " EQ" , style, switchHandleBitmap));
228226 pGraphics->AttachControl (
229227 new NAMSwitchControl (outNormToggleArea, kOutNorm , " Normalize" , style, switchHandleBitmap), kCtrlTagOutNorm );
@@ -243,9 +241,6 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
243241 pGraphics->AttachControl (new NAMMeterControl (inputMeterArea, meterBackgroundBitmap, style), kCtrlTagInputMeter );
244242 pGraphics->AttachControl (new NAMMeterControl (outputMeterArea, meterBackgroundBitmap, style), kCtrlTagOutputMeter );
245243
246- // A warning when NAM isn't being run in the right sample rate:
247- pGraphics->AttachControl (new NAMSampleRateWarningControl (sampleRateWarningArea), kCtrlTagSampleRateWarning );
248-
249244 // Help/about box
250245 pGraphics->AttachControl (new NAMCircleButtonControl (
251246 helpButtonArea,
@@ -368,7 +363,6 @@ void NeuralAmpModeler::OnReset()
368363 SetTailSize (tailCycles * (int )(sampleRate / kDCBlockerFrequency ));
369364 mInputSender .Reset (sampleRate);
370365 mOutputSender .Reset (sampleRate);
371- mCheckSampleRateWarning = true ;
372366 // If there is a model or IR loaded, they need to be checked for resampling.
373367 _ResetModelAndIR (sampleRate, GetBlockSize ());
374368 mToneStack ->Reset (sampleRate, maxBlockSize);
@@ -386,10 +380,6 @@ void NeuralAmpModeler::OnIdle()
386380
387381 mNewModelLoadedInDSP = false ;
388382 }
389- if (mCheckSampleRateWarning )
390- {
391- _CheckSampleRateWarning ();
392- }
393383}
394384
395385bool NeuralAmpModeler::SerializeState (IByteChunk& chunk) const
@@ -454,7 +444,6 @@ void NeuralAmpModeler::OnUIOpen()
454444
455445 if (mModel != nullptr )
456446 GetUI ()->GetControlWithTag (kCtrlTagOutNorm )->SetDisabled (!mModel ->HasLoudness ());
457- mCheckSampleRateWarning = true ;
458447}
459448
460449void NeuralAmpModeler::OnParamChange (int paramIdx)
@@ -542,7 +531,6 @@ void NeuralAmpModeler::_ApplyDSPStaging()
542531 mModel = nullptr ;
543532 mNAMPath .Set (" " );
544533 mShouldRemoveModel = false ;
545- mCheckSampleRateWarning = true ;
546534 SetLatency (0 );
547535 }
548536 if (mShouldRemoveIR )
@@ -558,7 +546,6 @@ void NeuralAmpModeler::_ApplyDSPStaging()
558546 mModel = std::move (mStagedModel );
559547 mStagedModel = nullptr ;
560548 mNewModelLoadedInDSP = true ;
561- mCheckSampleRateWarning = true ;
562549 SetLatency (mModel ->GetLatency ());
563550 }
564551 if (mStagedIR != nullptr )
@@ -568,24 +555,6 @@ void NeuralAmpModeler::_ApplyDSPStaging()
568555 }
569556}
570557
571- void NeuralAmpModeler::_CheckSampleRateWarning ()
572- {
573- if (auto * pGraphics = GetUI ())
574- {
575- auto * control = pGraphics->GetControlWithTag (kCtrlTagSampleRateWarning )->As <NAMSampleRateWarningControl>();
576- bool showWarning = false ;
577- if (_HaveModel ())
578- {
579- const auto pluginSampleRate = GetSampleRate ();
580- const auto namSampleRate = mModel ->GetEncapsulatedSampleRate ();
581- control->SetSampleRate (namSampleRate);
582- showWarning = pluginSampleRate != namSampleRate;
583- }
584- control->SetDisabled (!showWarning);
585- mCheckSampleRateWarning = false ;
586- }
587- }
588-
589558void NeuralAmpModeler::_DeallocateIOPointers ()
590559{
591560 if (mInputPointers != nullptr )
0 commit comments