Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: webrtc/modules/audio_mixer/frame_combiner.h

Issue 2692333002: Optionally disable APM limiter in AudioMixer. (Closed)
Patch Set: Deprecated old factory method. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_FRAME_COMBINER_H_
12 #define WEBRTC_MODULES_AUDIO_MIXER_FRAME_COMBINER_H_
13
14 #include <memory>
15 #include <vector>
16
17 #include "webrtc/modules/audio_processing/include/audio_processing.h"
18 #include "webrtc/modules/include/module_common_types.h"
19
20 namespace webrtc {
ivoc 2017/02/15 16:58:47 Please insert a blank line below. (between namespa
aleloi 2017/02/16 14:01:36 Done.
21 class FrameCombiner {
22 public:
23 explicit FrameCombiner(bool use_apm_limiter);
24 ~FrameCombiner();
25
26 // Combine several frames into one. Assumes sample_rate,
27 // samples_per_channel of the input frames match the parameters. The
28 // extra parameters are needed because 'mix_list' can be empty.
29 void Combine(const std::vector<AudioFrame*>& mix_list,
ivoc 2017/02/15 16:58:47 Can the function be const?
aleloi 2017/02/16 14:01:36 Yes, thank you! CombineMultipleFrames too. They ca
30 size_t number_of_channels,
31 int sample_rate,
32 AudioFrame* audio_frame_for_mixing);
33
34 private:
35 // Lower-level helper function called from Combine(...) when there
36 // are several input frames.
37 //
38 // TODO(aleloi): change interface to ArrayView<int16_t> output_frame
39 // once we have gotten rid of the APM limiter.
40 //
41 // Only the 'data' field of output_frame should be modified. The
42 // rest are used for potentially sending the output to the APM
43 // limiter.
44 void CombineMultipleFrames(
45 const std::vector<rtc::ArrayView<const int16_t>>& input_frames,
46 AudioFrame* audio_frame_for_mixing);
47
48 const bool use_apm_limiter_;
49 std::unique_ptr<AudioProcessing> limiter_;
50 };
51 } // namespace webrtc
52
53 #endif // WEBRTC_MODULES_AUDIO_MIXER_FRAME_COMBINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698