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 |
(...skipping 12 matching lines...) Expand all Loading... | |
23 public: | 23 public: |
24 explicit FrameCombiner(bool use_apm_limiter); | 24 explicit FrameCombiner(bool use_apm_limiter); |
25 ~FrameCombiner(); | 25 ~FrameCombiner(); |
26 | 26 |
27 // Combine several frames into one. Assumes sample_rate, | 27 // Combine several frames into one. Assumes sample_rate, |
28 // samples_per_channel of the input frames match the parameters. The | 28 // samples_per_channel of the input frames match the parameters. The |
29 // extra parameters are needed because 'mix_list' can be empty. | 29 // extra parameters are needed because 'mix_list' can be empty. |
30 void Combine(const std::vector<AudioFrame*>& mix_list, | 30 void Combine(const std::vector<AudioFrame*>& mix_list, |
31 size_t number_of_channels, | 31 size_t number_of_channels, |
32 int sample_rate, | 32 int sample_rate, |
33 int number_of_streams, | |
ivoc
2017/03/27 15:44:55
Please add a comment to explain this new parameter
hlundin-webrtc
2017/03/28 12:14:57
+1 for size_t.
aleloi
2017/03/28 14:49:05
Done.
| |
33 AudioFrame* audio_frame_for_mixing) const; | 34 AudioFrame* audio_frame_for_mixing) const; |
34 | 35 |
35 private: | 36 private: |
36 // Lower-level helper function called from Combine(...) when there | |
37 // are several input frames. | |
38 // | |
39 // TODO(aleloi): change interface to ArrayView<int16_t> output_frame | |
40 // once we have gotten rid of the APM limiter. | |
41 // | |
42 // Only the 'data' field of output_frame should be modified. The | |
43 // rest are used for potentially sending the output to the APM | |
44 // limiter. | |
45 void CombineMultipleFrames( | |
46 const std::vector<rtc::ArrayView<const int16_t>>& input_frames, | |
47 AudioFrame* audio_frame_for_mixing) const; | |
48 | |
49 const bool use_apm_limiter_; | 37 const bool use_apm_limiter_; |
50 std::unique_ptr<AudioProcessing> limiter_; | 38 std::unique_ptr<AudioProcessing> limiter_; |
51 }; | 39 }; |
52 } // namespace webrtc | 40 } // namespace webrtc |
53 | 41 |
54 #endif // WEBRTC_MODULES_AUDIO_MIXER_FRAME_COMBINER_H_ | 42 #endif // WEBRTC_MODULES_AUDIO_MIXER_FRAME_COMBINER_H_ |
OLD | NEW |