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

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

Issue 2692333002: Optionally disable APM limiter in AudioMixer. (Closed)
Patch Set: Fix int16_t <-> size_t compilation warnings. 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 {
21
22 class FrameCombiner {
23 public:
24 explicit FrameCombiner(bool use_apm_limiter);
25 ~FrameCombiner();
26
27 // Combine several frames into one. Assumes sample_rate,
28 // samples_per_channel of the input frames match the parameters. The
29 // extra parameters are needed because 'mix_list' can be empty.
30 void Combine(const std::vector<AudioFrame*>& mix_list,
31 size_t number_of_channels,
32 int sample_rate,
33 AudioFrame* audio_frame_for_mixing) const;
34
35 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_;
50 std::unique_ptr<AudioProcessing> limiter_;
51 };
52 } // namespace webrtc
53
54 #endif // WEBRTC_MODULES_AUDIO_MIXER_FRAME_COMBINER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_mixer/audio_mixer_impl_unittest.cc ('k') | webrtc/modules/audio_mixer/frame_combiner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698