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/voice_engine/utility.h" | 11 #include "webrtc/voice_engine/utility.h" |
12 | 12 |
13 #include "webrtc/audio/utility/audio_frame_operations.h" | 13 #include "webrtc/audio/utility/audio_frame_operations.h" |
14 #include "webrtc/base/checks.h" | |
15 #include "webrtc/base/logging.h" | |
16 #include "webrtc/common_audio/resampler/include/push_resampler.h" | 14 #include "webrtc/common_audio/resampler/include/push_resampler.h" |
17 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 15 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
18 #include "webrtc/common_types.h" | 16 #include "webrtc/common_types.h" |
19 #include "webrtc/modules/include/module_common_types.h" | 17 #include "webrtc/modules/include/module_common_types.h" |
| 18 #include "webrtc/rtc_base/checks.h" |
| 19 #include "webrtc/rtc_base/logging.h" |
20 #include "webrtc/voice_engine/voice_engine_defines.h" | 20 #include "webrtc/voice_engine/voice_engine_defines.h" |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 namespace voe { | 23 namespace voe { |
24 | 24 |
25 void RemixAndResample(const AudioFrame& src_frame, | 25 void RemixAndResample(const AudioFrame& src_frame, |
26 PushResampler<int16_t>* resampler, | 26 PushResampler<int16_t>* resampler, |
27 AudioFrame* dst_frame) { | 27 AudioFrame* dst_frame) { |
28 RemixAndResample(src_frame.data(), src_frame.samples_per_channel_, | 28 RemixAndResample(src_frame.data(), src_frame.samples_per_channel_, |
29 src_frame.num_channels_, src_frame.sample_rate_hz_, | 29 src_frame.num_channels_, src_frame.sample_rate_hz_, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 int32_t temp = 0; | 119 int32_t temp = 0; |
120 for (size_t i = 0; i < source_len; ++i) { | 120 for (size_t i = 0; i < source_len; ++i) { |
121 temp = source[i] + target[i]; | 121 temp = source[i] + target[i]; |
122 target[i] = WebRtcSpl_SatW32ToW16(temp); | 122 target[i] = WebRtcSpl_SatW32ToW16(temp); |
123 } | 123 } |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 } // namespace voe | 127 } // namespace voe |
128 } // namespace webrtc | 128 } // namespace webrtc |
OLD | NEW |