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

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

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/level_controller.h
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller.h b/webrtc/modules/audio_processing/level_controller/level_controller.h
index 3d203f908d53b9f564cc9f6ef2aa9a68b3e19f1e..1d7f174562f92a44a919b0916aef1ae447b494c4 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller.h
+++ b/webrtc/modules/audio_processing/level_controller/level_controller.h
@@ -38,6 +38,11 @@ class LevelController {
void Process(AudioBuffer* audio);
float GetLastGain() { return last_gain_; }
+ // Sets the initial peak level to use inside the level controller in order
+ // to compute the signal gain. The unit for the peak level is dBFS and
+ // the allowed range is [-100, 0].
+ void SetInitialLevel(float level);
+
private:
class Metrics {
public:
@@ -71,6 +76,7 @@ class LevelController {
float dc_level_[2];
float dc_forgetting_factor_;
float last_gain_;
+ bool gain_jumpstart_ = false;
RTC_DISALLOW_COPY_AND_ASSIGN(LevelController);
};

Powered by Google App Engine
This is Rietveld 408576698