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

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

Issue 2337083002: Reland of added functionality for specifying the initial signal level to use for the gain estimation (Closed)
Patch Set: Created 4 years, 3 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 1d8e043cce410adbb1b07e970b41bf75f08a4395..05784beeb457c9492123416573e44bcd47730444 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller.h
+++ b/webrtc/modules/audio_processing/level_controller/level_controller.h
@@ -38,11 +38,18 @@ class LevelController {
void Process(AudioBuffer* audio);
float GetLastGain() { return last_gain_; }
+ // TODO(peah): This method is a temporary solution used to take control
+ // over the parameters in the audio processing module and is likely to change.
the sun 2016/09/14 10:00:59 I don't understand this comment. How do we take co
peah-webrtc 2016/09/16 07:11:07 Totally agree. Done.
+ void ApplyConfig(const AudioProcessing::Config::LevelController& config);
// Validates a config.
static bool Validate(const AudioProcessing::Config::LevelController& config);
// Dumps a config to a string.
static std::string ToString(
const AudioProcessing::Config::LevelController& config);
+ // 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);
the sun 2016/09/14 10:00:59 Where is this used? The idea of setting up from a
peah-webrtc 2016/09/16 07:11:07 This is a leftover from the former CL. Sorry about
private:
class Metrics {
@@ -80,6 +87,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