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

Unified Diff: webrtc/modules/audio_processing/level_controller/level_controller.cc

Issue 2283793002: Revert of Added functionality for specifying the initial signal level to use for the gain estimation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/level_controller/level_controller.cc
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller.cc b/webrtc/modules/audio_processing/level_controller/level_controller.cc
index 07618e3ba73ff1b411ab58bf510652698d993a3f..a9fed9bf95ab04a9a0a6843e0616eb40e9034204 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller.cc
+++ b/webrtc/modules/audio_processing/level_controller/level_controller.cc
@@ -154,11 +154,6 @@
}
LevelController::~LevelController() {}
-
-void LevelController::SetInitialLevel(float level) {
- peak_level_estimator_.SetInitialPeakLevel(level);
- gain_jumpstart_ = true;
-}
void LevelController::Initialize(int sample_rate_hz) {
RTC_DCHECK(sample_rate_hz == AudioProcessing::kSampleRate8kHz ||
@@ -211,11 +206,8 @@
float saturating_gain = saturating_gain_estimator_.GetGain();
// Compute the new gain to apply.
- last_gain_ = gain_selector_.GetNewGain(
- peak_level, noise_energy, saturating_gain, gain_jumpstart_, signal_type);
-
- // Unflag the jumpstart of the gain as it should only happen once.
- gain_jumpstart_ = false;
+ last_gain_ = gain_selector_.GetNewGain(peak_level, noise_energy,
+ saturating_gain, signal_type);
// Apply the gain to the signal.
int num_saturations = gain_applier_.Process(last_gain_, audio);

Powered by Google App Engine
This is Rietveld 408576698