X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=audio_mixer.h;h=29016eb9ea7e07a68257bb8c02b6617edc4c4b6d;hb=2140fc18714d6e9ac2b0aca51d9b7ff986245c08;hp=5d65582c939fa191bcf8efad870d6e1c65b65c25;hpb=df76248ec883efbeafdbee35d995d688ec4ac69f;p=nageru diff --git a/audio_mixer.h b/audio_mixer.h index 5d65582..29016eb 100644 --- a/audio_mixer.h +++ b/audio_mixer.h @@ -238,7 +238,8 @@ 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, float volume); + void add_bus_to_master(unsigned bus_index, const std::vector &samples_bus, std::vector *samples_out); + void measure_bus_levels(unsigned bus_index, const std::vector &left, const std::vector &right); void send_audio_level_callback(); unsigned num_cards; @@ -286,6 +287,7 @@ private: InputMapping input_mapping; // Under audio_mutex. std::atomic 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;