return final_makeup_gain_auto;
}
+ void reset_peak(unsigned bus_index);
+
struct BusLevel {
float current_level_dbfs[2]; // Digital peak of last frame, left and right.
float peak_level_dbfs[2]; // Digital peak with hold, left and right.
void reset_alsa_mutex_held(DeviceSpec device_spec);
std::map<DeviceSpec, DeviceInfo> get_devices_mutex_held() const;
void update_meters(const std::vector<float> &samples);
- void measure_bus_levels(unsigned bus_index, const std::vector<float> &left, const std::vector<float> &right, float volume);
+ void add_bus_to_master(unsigned bus_index, const std::vector<float> &samples_bus, std::vector<float> *samples_out);
+ void measure_bus_levels(unsigned bus_index, const std::vector<float> &left, const std::vector<float> &right);
void send_audio_level_callback();
unsigned num_cards;
float last_peak = 0.0f;
float age_seconds = 0.0f; // Time since "last_peak" was set.
};
- PeakHistory peak_history[MAX_BUSES][2]; // Separate for each channel.
+ PeakHistory peak_history[MAX_BUSES][2]; // Separate for each channel. Under audio_mutex.
double final_makeup_gain = 1.0; // Under compressor_mutex. Read/write by the user. Note: Not in dB, we want the numeric precision so that we can change it slowly.
bool final_makeup_gain_auto = true; // Under compressor_mutex.
InputMapping input_mapping; // Under audio_mutex.
std::atomic<float> fader_volume_db[MAX_BUSES] {{ 0.0f }};
+ float last_fader_volume_db[MAX_BUSES] { 0.0f }; // Under audio_mutex.
audio_level_callback_t audio_level_callback = nullptr;
mutable std::mutex audio_measure_mutex;