OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 10 matching lines...) Expand all Loading... | |
21 // in the range of 0-32 | 21 // in the range of 0-32 |
22 const int8_t permutation[33] = | 22 const int8_t permutation[33] = |
23 {0,1,2,3,4,4,5,5,5,5,6,6,6,6,6,7,7,7,7,8,8,8,9,9,9,9,9,9,9,9,9,9,9}; | 23 {0,1,2,3,4,4,5,5,5,5,6,6,6,6,6,7,7,7,7,8,8,8,9,9,9,9,9,9,9,9,9,9,9}; |
24 | 24 |
25 | 25 |
26 AudioLevel::AudioLevel() : | 26 AudioLevel::AudioLevel() : |
27 _absMax(0), | 27 _absMax(0), |
28 _count(0), | 28 _count(0), |
29 _currentLevel(0), | 29 _currentLevel(0), |
30 _currentLevelFullRange(0) { | 30 _currentLevelFullRange(0) { |
31 WebRtcSpl_Init(); | |
mflodman
2016/08/18 09:34:13
This has already been called in VoEBaseImpl::Init,
aleloi
2016/08/18 09:40:33
I wanted to use the level indicator as a separate
mflodman
2016/08/18 09:45:28
But is it ok to do this twice in the case you run
minyue-webrtc
2016/08/18 09:53:08
It reads that WebRtcSpl_Init() should be called on
kwiberg-webrtc
2016/08/19 11:24:44
No, it's implemented so that it should be safe to
| |
31 } | 32 } |
32 | 33 |
33 AudioLevel::~AudioLevel() { | 34 AudioLevel::~AudioLevel() { |
34 } | 35 } |
35 | 36 |
36 void AudioLevel::Clear() | 37 void AudioLevel::Clear() |
37 { | 38 { |
38 rtc::CritScope cs(&_critSect); | 39 rtc::CritScope cs(&_critSect); |
39 _absMax = 0; | 40 _absMax = 0; |
40 _count = 0; | 41 _count = 0; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 | 92 |
92 int16_t AudioLevel::LevelFullRange() const | 93 int16_t AudioLevel::LevelFullRange() const |
93 { | 94 { |
94 rtc::CritScope cs(&_critSect); | 95 rtc::CritScope cs(&_critSect); |
95 return _currentLevelFullRange; | 96 return _currentLevelFullRange; |
96 } | 97 } |
97 | 98 |
98 } // namespace voe | 99 } // namespace voe |
99 | 100 |
100 } // namespace webrtc | 101 } // namespace webrtc |
OLD | NEW |