]> git.sesse.net Git - nageru/blobdiff - mixer.h
Hook up the reset meters button.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index e561a52edd37b856b936fe4c47f163bbf7da622e..6725a7f46e242fe44bdba8a7c0e583b422b42102 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -136,6 +136,8 @@ public:
                locut_cutoff_hz = cutoff_hz;
        }
 
+       void reset_meters();
+
 private:
        void bm_frame(unsigned card_index, uint16_t timecode,
                FrameAllocator::Frame video_frame, size_t video_offset, uint16_t video_format,
@@ -212,7 +214,7 @@ private:
        Ebu_r128_proc r128;
 
        // TODO: Implement oversampled peak detection.
-       float peak = 0.0f;
+       std::atomic<float> peak{0.0f};
 
        StereoFilter locut;  // Default cutoff 150 Hz, 24 dB/oct.
        std::atomic<float> locut_cutoff_hz;
@@ -220,6 +222,9 @@ private:
        // First compressor; takes us up to about -12 dBFS.
        StereoCompressor level_compressor;
        float last_gain_staging_db = 0.0f;
+
+       StereoCompressor limiter;
+       StereoCompressor compressor;
 };
 
 extern Mixer *global_mixer;