| Index: webrtc/modules/audio_processing/level_estimator_impl.cc
|
| diff --git a/webrtc/modules/audio_processing/level_estimator_impl.cc b/webrtc/modules/audio_processing/level_estimator_impl.cc
|
| index 35fe697c2d6defc1af1f16b556239d7c174e5c46..a434e9283c95d3a986b59b1a200c62416d089374 100644
|
| --- a/webrtc/modules/audio_processing/level_estimator_impl.cc
|
| +++ b/webrtc/modules/audio_processing/level_estimator_impl.cc
|
| @@ -17,14 +17,13 @@
|
|
|
| namespace webrtc {
|
|
|
| -LevelEstimatorImpl::LevelEstimatorImpl(const AudioProcessing* apm,
|
| - CriticalSectionWrapper* crit)
|
| - : ProcessingComponent(),
|
| - crit_(crit) {}
|
| +LevelEstimatorImpl::LevelEstimatorImpl(const AudioProcessing* apm)
|
| + : ProcessingComponent() {}
|
|
|
| LevelEstimatorImpl::~LevelEstimatorImpl() {}
|
|
|
| int LevelEstimatorImpl::ProcessStream(AudioBuffer* audio) {
|
| + // Only called from within APM so no locking needed.
|
| if (!is_component_enabled()) {
|
| return AudioProcessing::kNoError;
|
| }
|
| @@ -39,15 +38,16 @@ int LevelEstimatorImpl::ProcessStream(AudioBuffer* audio) {
|
| }
|
|
|
| int LevelEstimatorImpl::Enable(bool enable) {
|
| - CriticalSectionScoped crit_scoped(crit_);
|
| return EnableComponent(enable);
|
| }
|
|
|
| bool LevelEstimatorImpl::is_enabled() const {
|
| + // Only called from within APM so no locking needed.
|
| return is_component_enabled();
|
| }
|
|
|
| int LevelEstimatorImpl::RMS() {
|
| + // Only called from within APM so no locking needed.
|
| if (!is_component_enabled()) {
|
| return AudioProcessing::kNotEnabledError;
|
| }
|
|
|