Skip to content

Commit a1e959e

Browse files
authored
Add resampling info message (#399)
1 parent 8d07837 commit a1e959e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

NeuralAmpModeler/NeuralAmpModeler.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,7 @@ void NeuralAmpModeler::_CheckSampleRateWarning()
558558
if (_HaveModel())
559559
{
560560
const auto pluginSampleRate = GetSampleRate();
561-
const auto namSampleRateFromModel = mModel->GetExpectedSampleRate();
562-
// Any model with "-1" is probably 48k
563-
const auto namSampleRate = namSampleRateFromModel == -1.0 ? 48000.0 : namSampleRateFromModel;
561+
const auto namSampleRate = mModel->GetEncapsulatedSampleRate();
564562
control->SetSampleRate(namSampleRate);
565563
showWarning = pluginSampleRate != namSampleRate;
566564
}

NeuralAmpModeler/NeuralAmpModelerControls.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class NAMMeterControl : public IVPeakAvgMeterControl<>, public IBitmapBase
431431
}
432432
};
433433

434-
const IText _WARNING_TEXT(DEFAULT_TEXT_SIZE + 3.f, COLOR_RED, "Roboto-Regular", EAlign::Near);
434+
const IText _WARNING_TEXT(DEFAULT_TEXT_SIZE + 3.f, PluginColors::NAM_THEMECOLOR, "Roboto-Regular", EAlign::Near);
435435

436436
class NAMSampleRateWarningControl : public ITextControl
437437
{
@@ -456,7 +456,7 @@ class NAMSampleRateWarningControl : public ITextControl
456456
void SetSampleRate(const double sampleRate)
457457
{
458458
std::stringstream ss;
459-
ss << "WARNING: NAM model expects sample rate " << static_cast<long>(std::round(sampleRate));
459+
ss << "[INFO] Resampling to " << static_cast<long>(std::round(sampleRate)) << " Hz";
460460
SetStr(ss.str().c_str());
461461
}
462462

0 commit comments

Comments
 (0)