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 |
11 #include "webrtc/modules/audio_processing/agc/agc.h" | 11 #include "webrtc/modules/audio_processing/agc/agc.h" |
12 | 12 |
13 #include <cmath> | 13 #include <cmath> |
14 #include <cstdlib> | 14 #include <cstdlib> |
15 | 15 |
16 #include <algorithm> | 16 #include <algorithm> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
| 19 #include "webrtc/base/checks.h" |
19 #include "webrtc/modules/audio_processing/agc/loudness_histogram.h" | 20 #include "webrtc/modules/audio_processing/agc/loudness_histogram.h" |
20 #include "webrtc/modules/audio_processing/agc/utility.h" | 21 #include "webrtc/modules/audio_processing/agc/utility.h" |
21 #include "webrtc/modules/include/module_common_types.h" | 22 #include "webrtc/modules/include/module_common_types.h" |
22 #include "webrtc/rtc_base/checks.h" | |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 namespace { | 25 namespace { |
26 | 26 |
27 const int kDefaultLevelDbfs = -18; | 27 const int kDefaultLevelDbfs = -18; |
28 const int kNumAnalysisFrames = 100; | 28 const int kNumAnalysisFrames = 100; |
29 const double kActivityThreshold = 0.3; | 29 const double kActivityThreshold = 0.3; |
30 | 30 |
31 } // namespace | 31 } // namespace |
32 | 32 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 int Agc::target_level_dbfs() const { | 100 int Agc::target_level_dbfs() const { |
101 return target_level_dbfs_; | 101 return target_level_dbfs_; |
102 } | 102 } |
103 | 103 |
104 float Agc::voice_probability() const { | 104 float Agc::voice_probability() const { |
105 return vad_.last_voice_probability(); | 105 return vad_.last_voice_probability(); |
106 } | 106 } |
107 | 107 |
108 } // namespace webrtc | 108 } // namespace webrtc |
OLD | NEW |