X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mixer.h;h=312566d891e0371eac7ebf765299480fec074f42;hb=7135fa089d451be5114f65579a20e25df3831f5a;hp=33f3a982cbb0519241224bbe67aa605d3b373f56;hpb=d6d9eecec0c85a5cd4aabfce5732421a94af5a5d;p=nageru diff --git a/mixer.h b/mixer.h index 33f3a98..312566d 100644 --- a/mixer.h +++ b/mixer.h @@ -29,6 +29,8 @@ #include "resampler.h" #include "theme.h" #include "timebase.h" +#include "stereocompressor.h" +#include "filter.h" class H264Encoder; class QSurface; @@ -95,7 +97,9 @@ public: output_channel[output].set_frame_ready_callback(callback); } - typedef std::function audio_level_callback_t; + typedef std::function audio_level_callback_t; void set_audio_level_callback(audio_level_callback_t callback) { audio_level_callback = callback; @@ -203,6 +207,12 @@ private: // TODO: Implement oversampled peak detection. float peak = 0.0f; + + StereoFilter locut; // Cutoff 150 Hz, 24 dB/oct. + + // First compressor; takes us up to about -12 dBFS. + StereoCompressor level_compressor; + float last_gain_staging_db = 0.0f; }; extern Mixer *global_mixer;