Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(910)

Unified Diff: webrtc/voice_engine/audio_level.h

Issue 2998763002: Add thread annotations to AudioLevel (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/audio_level.h
diff --git a/webrtc/voice_engine/audio_level.h b/webrtc/voice_engine/audio_level.h
index caecf40689ea27f9dbceeabafde5c7d761da7772..d69365afb6ee460bf4d6bcc1d32a5d0664803148 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698