]> git.sesse.net Git - nageru/blobdiff - mixer.h
Rename Resampler to ResamplingQueue, to avoid conflicts with zita-resampler.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index 31886fd707a2c411f9167346add045ca3154edcb..3a19d3aaef946f6257a27a9ae060c0cf057306ba 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -27,7 +27,7 @@
 #include "pbo_frame_allocator.h"
 #include "ref_counted_frame.h"
 #include "ref_counted_gl_sync.h"
-#include "resampler.h"
+#include "resampling_queue.h"
 #include "theme.h"
 #include "timebase.h"
 #include "stereocompressor.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,
@@ -179,7 +181,7 @@ private:
                unsigned dropped_frames = 0;  // Before new_frame.
 
                std::mutex audio_mutex;
-               std::unique_ptr<Resampler> resampler;  // Under audio_mutex.
+               std::unique_ptr<ResamplingQueue> resampling_queue;  // Under audio_mutex.
                int last_timecode = -1;  // Unwrapped.
        };
        CaptureCard cards[MAX_CARDS];  // protected by <bmusb_mutex>
@@ -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;