Add normalization gain factor to Export Analysis
[ardour.git] / libs / audiographer / src / general / normalizer.cc
index d241d71892db5cf95e06b12c051e96021e1962c8..a10382031a520de6ec8cbb5065f2bf708c11856c 100644 (file)
@@ -37,7 +37,7 @@ Normalizer::~Normalizer()
 }
 
 /// Sets the peak found in the material to be normalized \see PeakReader \n RT safe
-void Normalizer::set_peak (float peak)
+float Normalizer::set_peak (float peak)
 {
        if (peak == 0.0f || peak == target) {
                /* don't even try */
@@ -46,6 +46,7 @@ void Normalizer::set_peak (float peak)
                enabled = true;
                gain = target / peak;
        }
+       return enabled ? gain : 1.0;
 }
 
 /** Allocates a buffer for using with const ProcessContexts