+ std::atomic<bool> mute[MAX_BUSES] {{ false }};
+ float last_fader_volume_db[MAX_BUSES] { 0.0f }; // Under audio_mutex.
+ std::atomic<float> eq_level_db[MAX_BUSES][NUM_EQ_BANDS] {{{ 0.0f }}};
+ float last_eq_level_db[MAX_BUSES][NUM_EQ_BANDS] {{ 0.0f }};
+
+ audio_level_callback_t audio_level_callback = nullptr;
+ state_changed_callback_t state_changed_callback = nullptr;
+ mutable std::mutex audio_measure_mutex;
+ Ebu_r128_proc r128; // Under audio_measure_mutex.
+ CorrelationMeasurer correlation; // Under audio_measure_mutex.
+ Resampler peak_resampler; // Under audio_measure_mutex.
+ std::atomic<float> peak{0.0f};
+
+ // Metrics.
+ std::atomic<double> metric_audio_loudness_short_lufs{0.0 / 0.0};
+ std::atomic<double> metric_audio_loudness_integrated_lufs{0.0 / 0.0};
+ std::atomic<double> metric_audio_loudness_range_low_lufs{0.0 / 0.0};
+ std::atomic<double> metric_audio_loudness_range_high_lufs{0.0 / 0.0};
+ std::atomic<double> metric_audio_peak_dbfs{0.0 / 0.0};
+ std::atomic<double> metric_audio_final_makeup_gain_db{0.0};
+ std::atomic<double> metric_audio_correlation{0.0};
+
+ // These are all gauges corresponding to the elements of BusLevel.
+ // In a sense, they'd probably do better as histograms, but that's an
+ // awful lot of time series when you have many buses.
+ struct BusMetrics {
+ std::vector<std::pair<std::string, std::string>> labels;
+ std::atomic<double> current_level_dbfs[2]{{0.0/0.0},{0.0/0.0}};
+ std::atomic<double> peak_level_dbfs[2]{{0.0/0.0},{0.0/0.0}};
+ std::atomic<double> historic_peak_dbfs{0.0/0.0};
+ std::atomic<double> gain_staging_db{0.0/0.0};
+ std::atomic<double> compressor_attenuation_db{0.0/0.0};
+ };
+ std::unique_ptr<BusMetrics[]> bus_metrics; // One for each bus in <input_mapping>.