| 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 187873e33e00f2e20bb3745045eedb06c322e3eb..7b91654c9ab2040d7c909e0230d931da44410ec8 100644
|
| --- a/webrtc/modules/audio_processing/level_estimator_impl.cc
|
| +++ b/webrtc/modules/audio_processing/level_estimator_impl.cc
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "webrtc/modules/audio_processing/level_estimator_impl.h"
|
|
|
| +#include "webrtc/base/array_view.h"
|
| #include "webrtc/modules/audio_processing/audio_buffer.h"
|
| #include "webrtc/modules/audio_processing/rms_level.h"
|
| #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
|
| @@ -17,7 +18,7 @@
|
| namespace webrtc {
|
|
|
| LevelEstimatorImpl::LevelEstimatorImpl(rtc::CriticalSection* crit)
|
| - : crit_(crit), rms_(new RMSLevel()) {
|
| + : crit_(crit), rms_(new RmsLevel()) {
|
| RTC_DCHECK(crit);
|
| }
|
|
|
| @@ -36,7 +37,8 @@ void LevelEstimatorImpl::ProcessStream(AudioBuffer* audio) {
|
| }
|
|
|
| for (size_t i = 0; i < audio->num_channels(); i++) {
|
| - rms_->Process(audio->channels_const()[i], audio->num_frames());
|
| + rms_->Analyze(rtc::ArrayView<const int16_t>(audio->channels_const()[i],
|
| + audio->num_frames()));
|
| }
|
| }
|
|
|
| @@ -60,6 +62,6 @@ int LevelEstimatorImpl::RMS() {
|
| return AudioProcessing::kNotEnabledError;
|
| }
|
|
|
| - return rms_->RMS();
|
| + return rms_->Average();
|
| }
|
| } // namespace webrtc
|
|
|