Remove APM limiter in Audio Mixer.
The FrameCombiner sub-module of the AudioMixer uses one of two
limiters. One is an AudioProcessingModule with AGC1 enabled and
configured as a limiter. The other is the limiter part of AGC2. This
change removes the APM-AGC1 limiter. This requires small changes to
FrameCombiner, AudioMixerImpl and tests.
We also stop using the finch experiment flag.
Bug: webrtc:8925
Change-Id: Id7b8349ec4720b6417b15eaf70ed1a850b6ddbed
Reviewed-on: https://webrtc-review.googlesource.com/84620
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23727}
diff --git a/modules/audio_mixer/frame_combiner.h b/modules/audio_mixer/frame_combiner.h
index 2b77d6e..70ac027 100644
--- a/modules/audio_mixer/frame_combiner.h
+++ b/modules/audio_mixer/frame_combiner.h
@@ -14,8 +14,8 @@
#include <memory>
#include <vector>
+#include "api/audio/audio_frame.h"
#include "modules/audio_processing/agc2/fixed_gain_controller.h"
-#include "modules/audio_processing/include/audio_processing.h"
namespace webrtc {
class ApmDataDumper;
@@ -24,12 +24,9 @@
class FrameCombiner {
public:
enum class LimiterType { kNoLimiter, kApmAgcLimiter, kApmAgc2Limiter };
- explicit FrameCombiner(LimiterType limiter_type);
explicit FrameCombiner(bool use_limiter);
~FrameCombiner();
- void SetLimiterType(LimiterType limiter_type);
-
// Combine several frames into one. Assumes sample_rate,
// samples_per_channel of the input frames match the parameters. The
// parameters 'number_of_channels' and 'sample_rate' are needed
@@ -47,10 +44,9 @@
int sample_rate,
size_t number_of_streams) const;
- LimiterType limiter_type_;
- std::unique_ptr<AudioProcessing> apm_agc_limiter_;
std::unique_ptr<ApmDataDumper> data_dumper_;
- FixedGainController apm_agc2_limiter_;
+ FixedGainController limiter_;
+ const bool use_limiter_;
mutable int uma_logging_counter_ = 0;
};
} // namespace webrtc