OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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/transient/transient_suppressor.h" | 11 #include "webrtc/modules/audio_processing/transient/transient_suppressor.h" |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 #include <string.h> | 14 #include <string.h> |
15 #include <cmath> | 15 #include <cmath> |
16 #include <complex> | 16 #include <complex> |
17 #include <deque> | 17 #include <deque> |
18 #include <set> | 18 #include <set> |
19 | 19 |
20 #include "webrtc/base/scoped_ptr.h" | |
21 #include "webrtc/common_audio/fft4g.h" | 20 #include "webrtc/common_audio/fft4g.h" |
22 #include "webrtc/common_audio/include/audio_util.h" | 21 #include "webrtc/common_audio/include/audio_util.h" |
23 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 22 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
24 #include "webrtc/modules/audio_processing/transient/common.h" | 23 #include "webrtc/modules/audio_processing/transient/common.h" |
25 #include "webrtc/modules/audio_processing/transient/transient_detector.h" | 24 #include "webrtc/modules/audio_processing/transient/transient_detector.h" |
26 #include "webrtc/modules/audio_processing/ns/windows_private.h" | 25 #include "webrtc/modules/audio_processing/ns/windows_private.h" |
27 #include "webrtc/system_wrappers/include/logging.h" | 26 #include "webrtc/system_wrappers/include/logging.h" |
28 #include "webrtc/typedefs.h" | 27 #include "webrtc/typedefs.h" |
29 | 28 |
30 namespace webrtc { | 29 namespace webrtc { |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 const float magnitude_ratio = new_magnitude / magnitudes_[i]; | 414 const float magnitude_ratio = new_magnitude / magnitudes_[i]; |
416 | 415 |
417 fft_buffer_[i * 2] *= magnitude_ratio; | 416 fft_buffer_[i * 2] *= magnitude_ratio; |
418 fft_buffer_[i * 2 + 1] *= magnitude_ratio; | 417 fft_buffer_[i * 2 + 1] *= magnitude_ratio; |
419 magnitudes_[i] = new_magnitude; | 418 magnitudes_[i] = new_magnitude; |
420 } | 419 } |
421 } | 420 } |
422 } | 421 } |
423 | 422 |
424 } // namespace webrtc | 423 } // namespace webrtc |
OLD | NEW |