Index: webrtc/modules/audio_processing/level_controller/peak_level_estimator.h |
diff --git a/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h b/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h |
index 270bbc3ad0a1e9e7960a36892033b2ea5947d778..8ec2d7677ccca4211426c70a4515feba61b0a27a 100644 |
--- a/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h |
+++ b/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h |
@@ -12,6 +12,8 @@ |
#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_ |
#include "webrtc/base/constructormagic.h" |
+#include "webrtc/base/gtest_prod_util.h" |
+#include "webrtc/modules/audio_processing/level_controller/lc_constants.h" |
#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h" |
namespace webrtc { |
@@ -23,9 +25,15 @@ class PeakLevelEstimator { |
void Initialize(); |
float Analyze(SignalClassifier::SignalType signal_type, |
float frame_peak_level); |
+ // 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 SetInitialPeakLevel(float level); |
private: |
+ FRIEND_TEST_ALL_PREFIXES(LevelControllerConfig, InitialLevel); |
float peak_level_; |
+ float initial_peak_level_ = kTargetLcPeakLevel; |
the sun
2016/09/16 12:40:25
Is this default value really needed? Won't it be s
peah-webrtc
2016/09/19 16:37:10
Not in the way it is now, as it basically constitu
|
int hold_counter_; |
bool initialization_phase_; |