OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Called on a native capture audio thread (platform dependent) from the | 38 // Called on a native capture audio thread (platform dependent) from the |
39 // AudioTransport::RecordedDataIsAvailable() callback. | 39 // AudioTransport::RecordedDataIsAvailable() callback. |
40 // In Chrome, this method is called on the AudioInputDevice thread. | 40 // In Chrome, this method is called on the AudioInputDevice thread. |
41 void ComputeLevel(const AudioFrame& audioFrame, double duration); | 41 void ComputeLevel(const AudioFrame& audioFrame, double duration); |
42 | 42 |
43 private: | 43 private: |
44 enum { kUpdateFrequency = 10 }; | 44 enum { kUpdateFrequency = 10 }; |
45 | 45 |
46 rtc::CriticalSection crit_sect_; | 46 rtc::CriticalSection crit_sect_; |
47 | 47 |
48 int16_t abs_max_ GUARDED_BY(crit_sect_); | 48 int16_t abs_max_ RTC_GUARDED_BY(crit_sect_); |
49 int16_t count_ GUARDED_BY(crit_sect_); | 49 int16_t count_ RTC_GUARDED_BY(crit_sect_); |
50 int8_t current_level_ GUARDED_BY(crit_sect_); | 50 int8_t current_level_ RTC_GUARDED_BY(crit_sect_); |
51 int16_t current_level_full_range_ GUARDED_BY(crit_sect_); | 51 int16_t current_level_full_range_ RTC_GUARDED_BY(crit_sect_); |
52 | 52 |
53 double total_energy_ GUARDED_BY(crit_sect_) = 0.0; | 53 double total_energy_ RTC_GUARDED_BY(crit_sect_) = 0.0; |
54 double total_duration_ GUARDED_BY(crit_sect_) = 0.0; | 54 double total_duration_ RTC_GUARDED_BY(crit_sect_) = 0.0; |
55 }; | 55 }; |
56 | 56 |
57 } // namespace voe | 57 } // namespace voe |
58 } // namespace webrtc | 58 } // namespace webrtc |
59 | 59 |
60 #endif // WEBRTC_VOICE_ENGINE_AUDIO_LEVEL_H_ | 60 #endif // WEBRTC_VOICE_ENGINE_AUDIO_LEVEL_H_ |
OLD | NEW |