X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=audio_mixer.h;h=31611af095151b4f65b2cc40f7836ed39b06887d;hb=326471d561a5bdec283968571eb627915b93667d;hp=75b468a120f7d1f39aa293009e9b76153ae4e9a3;hpb=c015407a3953235df07a601baa6aa8e02ba7b561;p=nageru diff --git a/audio_mixer.h b/audio_mixer.h index 75b468a..31611af 100644 --- a/audio_mixer.h +++ b/audio_mixer.h @@ -202,6 +202,7 @@ public: } typedef std::function bus_level_lufs, float global_level_lufs, float range_low_lufs, float range_high_lufs, float gain_staging_db, float final_makeup_gain_db, float correlation)> audio_level_callback_t; @@ -229,6 +230,7 @@ private: void reset_alsa_mutex_held(DeviceSpec device_spec); std::map get_devices_mutex_held() const; void update_meters(const std::vector &samples); + void measure_bus_levels(unsigned bus_index, const std::vector &left, const std::vector &right); void send_audio_level_callback(); unsigned num_cards; @@ -273,6 +275,12 @@ private: CorrelationMeasurer correlation; // Under audio_measure_mutex. Resampler peak_resampler; // Under audio_measure_mutex. std::atomic peak{0.0f}; + + // Under audio_measure_mutex. Note that Ebu_r128_proc has a broken + // copy constructor (it uses the default, but holds arrays), + // so we can't just use raw Ebu_r128_proc elements, but need to use + // unique_ptrs. + std::vector> bus_r128; }; #endif // !defined(_AUDIO_MIXER_H)