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

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

Issue 2254973003: Added functionality for specifying the initial signal level to use for the gain estimation in the l… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase 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/gain_selector.cc
diff --git a/webrtc/modules/audio_processing/level_controller/gain_selector.cc b/webrtc/modules/audio_processing/level_controller/gain_selector.cc
index 2accd7180c4e9a6e2b942e47d56d69297aafa176..80d9c0f1c56357ae29997905f14efe5a664be65e 100644
--- a/webrtc/modules/audio_processing/level_controller/gain_selector.cc
+++ b/webrtc/modules/audio_processing/level_controller/gain_selector.cc
@@ -42,10 +42,12 @@ void GainSelector::Initialize(int sample_rate_hz) {
float GainSelector::GetNewGain(float peak_level,
float noise_energy,
float saturating_gain,
+ bool gain_jumpstart,
SignalClassifier::SignalType signal_type) {
RTC_DCHECK_LT(0.f, peak_level);
- if (signal_type == SignalClassifier::SignalType::kHighlyNonStationary) {
+ if (signal_type == SignalClassifier::SignalType::kHighlyNonStationary ||
+ gain_jumpstart) {
highly_nonstationary_signal_hold_counter_ = 100;
} else {
highly_nonstationary_signal_hold_counter_ =

Powered by Google App Engine
This is Rietveld 408576698