]> git.sesse.net Git - nageru/commitdiff
Rename compressor to level_compressor.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 6 Nov 2015 23:37:25 +0000 (00:37 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 6 Nov 2015 23:53:44 +0000 (00:53 +0100)
mixer.cpp
mixer.h

index 43e39b6c18e8518b8b0ecee7df91ebf0d2a0b269..6f9bf05d725d73aebc47639fdc0d26cad55ca608 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -69,7 +69,7 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards)
          num_cards(num_cards),
          mixer_surface(create_surface(format)),
          h264_encoder_surface(create_surface(format)),
-         compressor(48000.0f)
+         level_compressor(48000.0f)
 {
        httpd.start(9095);
 
@@ -555,7 +555,7 @@ void Mixer::process_audio_one_frame()
        float attack_time = 0.1f;
        float release_time = 10.0f;
        float makeup_gain = pow(10.0f, 28.0f / 20.0f);  // +28 dB takes us to -12 dBFS.
-       compressor.process(samples_out.data(), samples_out.size() / 2, threshold, ratio, attack_time, release_time, makeup_gain);
+       level_compressor.process(samples_out.data(), samples_out.size() / 2, threshold, ratio, attack_time, release_time, makeup_gain);
 
 #if 0
        printf("level=%f (%+5.2f dBFS) attenuation=%f (%+5.2f dB) end_result=%+5.2f dB\n",
diff --git a/mixer.h b/mixer.h
index 8ac322fd921f66e902d02fc76202e1de957674a9..cdc6f1c8c32762b6e68f86ea61c1d3745e355f92 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -205,7 +205,8 @@ private:
        // TODO: Implement oversampled peak detection.
        float peak = 0.0f;
 
-       StereoCompressor compressor;
+       // First compressor; takes us up to about -12 dBFS.
+       StereoCompressor level_compressor;
 };
 
 extern Mixer *global_mixer;