diff --git a/webrtc/voice_engine/audio_level.h b/webrtc/voice_engine/audio_level.h index caecf40689..d69365afb6 100644 --- a/webrtc/voice_engine/audio_level.h +++ b/webrtc/voice_engine/audio_level.h @@ -12,6 +12,7 @@ #define WEBRTC_VOICE_ENGINE_AUDIO_LEVEL_H_ #include "webrtc/rtc_base/criticalsection.h" +#include "webrtc/rtc_base/thread_annotations.h" #include "webrtc/typedefs.h" namespace webrtc { @@ -44,13 +45,13 @@ class AudioLevel { rtc::CriticalSection crit_sect_; - int16_t abs_max_; - int16_t count_; - int8_t current_level_; - int16_t current_level_full_range_; + int16_t abs_max_ GUARDED_BY(crit_sect_); + int16_t count_ GUARDED_BY(crit_sect_); + int8_t current_level_ GUARDED_BY(crit_sect_); + int16_t current_level_full_range_ GUARDED_BY(crit_sect_); - double total_energy_ = 0.0; - double total_duration_ = 0.0; + double total_energy_ GUARDED_BY(crit_sect_) = 0.0; + double total_duration_ GUARDED_BY(crit_sect_) = 0.0; }; } // namespace voe