Add quality scaling support

This commit is contained in:
Mike Oliphant
2026-05-17 09:24:26 -07:00
parent b4dbac6042
commit 8ac44e3ee0
3 changed files with 22 additions and 0 deletions
+12
View File
@@ -252,6 +252,18 @@ namespace NAM {
}
}
if (*(ports.quality_scale) != qualityScale)
{
qualityScale = *(ports.quality_scale);
NeuralAudio::NeuralModel::SetDefaultQualityScaleFactor(qualityScale);
if (currentModel != nullptr)
{
currentModel->SetQualityScaleFactor(qualityScale);
}
}
float level;
float modelInputAdjustmentDB = 0;
+2
View File
@@ -60,6 +60,7 @@ namespace NAM {
float* audio_out;
float* input_level;
float* output_level;
float* quality_scale;
};
Ports ports = {};
@@ -74,6 +75,7 @@ namespace NAM {
std::string currentModelPath;
float prevDCInput = 0;
float prevDCOutput = 0;
float qualityScale = 1.0f;
Plugin();
~Plugin();