OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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_mixer/frame_combiner.h" | 11 #include "webrtc/modules/audio_mixer/frame_combiner.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <array> | 14 #include <array> |
15 #include <functional> | 15 #include <functional> |
16 #include <memory> | 16 #include <memory> |
17 | 17 |
18 #include "webrtc/audio/utility/audio_frame_operations.h" | 18 #include "webrtc/audio/utility/audio_frame_operations.h" |
| 19 #include "webrtc/base/array_view.h" |
| 20 #include "webrtc/base/checks.h" |
| 21 #include "webrtc/base/logging.h" |
19 #include "webrtc/modules/audio_mixer/audio_frame_manipulator.h" | 22 #include "webrtc/modules/audio_mixer/audio_frame_manipulator.h" |
20 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" | 23 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" |
21 #include "webrtc/rtc_base/array_view.h" | |
22 #include "webrtc/rtc_base/checks.h" | |
23 #include "webrtc/rtc_base/logging.h" | |
24 | 24 |
25 namespace webrtc { | 25 namespace webrtc { |
26 namespace { | 26 namespace { |
27 | 27 |
28 // Stereo, 48 kHz, 10 ms. | 28 // Stereo, 48 kHz, 10 ms. |
29 constexpr int kMaximalFrameSize = 2 * 48 * 10; | 29 constexpr int kMaximalFrameSize = 2 * 48 * 10; |
30 | 30 |
31 void CombineZeroFrames(bool use_limiter, | 31 void CombineZeroFrames(bool use_limiter, |
32 AudioProcessing* limiter, | 32 AudioProcessing* limiter, |
33 AudioFrame* audio_frame_for_mixing) { | 33 AudioFrame* audio_frame_for_mixing) { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 for (size_t i = 0; i < mix_list.size(); ++i) { | 209 for (size_t i = 0; i < mix_list.size(); ++i) { |
210 input_frames.push_back(rtc::ArrayView<const int16_t>( | 210 input_frames.push_back(rtc::ArrayView<const int16_t>( |
211 mix_list[i]->data(), samples_per_channel * number_of_channels)); | 211 mix_list[i]->data(), samples_per_channel * number_of_channels)); |
212 } | 212 } |
213 CombineMultipleFrames(input_frames, use_limiter_this_round, limiter_.get(), | 213 CombineMultipleFrames(input_frames, use_limiter_this_round, limiter_.get(), |
214 audio_frame_for_mixing); | 214 audio_frame_for_mixing); |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 } // namespace webrtc | 218 } // namespace webrtc |
OLD | NEW |