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/vad/vad_audio_proc.h" | 11 #include "webrtc/modules/audio_processing/vad/vad_audio_proc.h" |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 #include <stdio.h> | 14 #include <stdio.h> |
15 | 15 |
16 #include "webrtc/base/checks.h" | |
17 #include "webrtc/common_audio/fft4g.h" | 16 #include "webrtc/common_audio/fft4g.h" |
18 #include "webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h" | |
19 #include "webrtc/modules/audio_processing/vad/pitch_internal.h" | 17 #include "webrtc/modules/audio_processing/vad/pitch_internal.h" |
20 #include "webrtc/modules/audio_processing/vad/pole_zero_filter.h" | 18 #include "webrtc/modules/audio_processing/vad/pole_zero_filter.h" |
| 19 #include "webrtc/modules/audio_processing/vad/vad_audio_proc_internal.h" |
| 20 #include "webrtc/rtc_base/checks.h" |
21 extern "C" { | 21 extern "C" { |
22 #include "webrtc/modules/audio_coding/codecs/isac/main/source/codec.h" | 22 #include "webrtc/modules/audio_coding/codecs/isac/main/source/codec.h" |
23 #include "webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h" | 23 #include "webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.h" |
24 #include "webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h" | 24 #include "webrtc/modules/audio_coding/codecs/isac/main/source/pitch_estimator.h" |
25 #include "webrtc/modules/audio_coding/codecs/isac/main/source/structs.h" | 25 #include "webrtc/modules/audio_coding/codecs/isac/main/source/structs.h" |
26 } | 26 } |
27 #include "webrtc/modules/include/module_common_types.h" | 27 #include "webrtc/modules/include/module_common_types.h" |
28 | 28 |
29 namespace webrtc { | 29 namespace webrtc { |
30 | 30 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 size_t offset = kNumPastSignalSamples; | 267 size_t offset = kNumPastSignalSamples; |
268 for (size_t i = 0; i < kNum10msSubframes; i++) { | 268 for (size_t i = 0; i < kNum10msSubframes; i++) { |
269 rms[i] = 0; | 269 rms[i] = 0; |
270 for (size_t n = 0; n < kNumSubframeSamples; n++, offset++) | 270 for (size_t n = 0; n < kNumSubframeSamples; n++, offset++) |
271 rms[i] += audio_buffer_[offset] * audio_buffer_[offset]; | 271 rms[i] += audio_buffer_[offset] * audio_buffer_[offset]; |
272 rms[i] = sqrt(rms[i] / kNumSubframeSamples); | 272 rms[i] = sqrt(rms[i] / kNumSubframeSamples); |
273 } | 273 } |
274 } | 274 } |
275 | 275 |
276 } // namespace webrtc | 276 } // namespace webrtc |
OLD | NEW |