This CL adds functionality in the level controller to
receive a signal level to use initially, instead of the
default initial signal level.
The initial form of the CL
(https://codereview.webrtc.org/2254973003/) was reverted
due to down-stream dependencies. These have been resolved,
but the CL needed to be revised according to the new scheme
for passing parameters to the audio processing module.
Therefore, please review this CL as if it is new.
TBR=aleloi@webrtc.org
BUG=webrtc:6386
Review-Url: https://codereview.webrtc.org/2337083002
Cr-Commit-Position: refs/heads/master@{#14579}
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 270bbc3..f908717 100644
--- a/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h
+++ b/webrtc/modules/audio_processing/level_controller/peak_level_estimator.h
@@ -12,24 +12,24 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_CONTROLLER_PEAK_LEVEL_ESTIMATOR_H_
#include "webrtc/base/constructormagic.h"
+#include "webrtc/modules/audio_processing/level_controller/level_controller_constants.h"
#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
namespace webrtc {
class PeakLevelEstimator {
public:
- PeakLevelEstimator();
+ explicit PeakLevelEstimator(float initial_peak_level_dbfs);
~PeakLevelEstimator();
- void Initialize();
+ void Initialize(float initial_peak_level_dbfs);
float Analyze(SignalClassifier::SignalType signal_type,
float frame_peak_level);
-
private:
float peak_level_;
int hold_counter_;
bool initialization_phase_;
- RTC_DISALLOW_COPY_AND_ASSIGN(PeakLevelEstimator);
+ RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PeakLevelEstimator);
};
} // namespace webrtc