| Index: webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc
|
| diff --git a/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc b/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc
|
| index 82850f80d646c494163231e1c0a1ef3decf23ca9..62e41856b480987cfe2779a1a4b9b7608ca41847 100644
|
| --- a/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc
|
| +++ b/webrtc/modules/audio_processing/aec3/shadow_filter_update_gain_unittest.cc
|
| @@ -16,9 +16,10 @@
|
| #include <vector>
|
|
|
| #include "webrtc/base/random.h"
|
| +#include "webrtc/base/safe_minmax.h"
|
| #include "webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h"
|
| -#include "webrtc/modules/audio_processing/aec3/aec_state.h"
|
| #include "webrtc/modules/audio_processing/aec3/aec3_common.h"
|
| +#include "webrtc/modules/audio_processing/aec3/aec_state.h"
|
| #include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
|
| #include "webrtc/test/gtest.h"
|
|
|
| @@ -75,9 +76,8 @@ void RunFilterUpdateTest(int num_blocks_to_process,
|
| std::transform(y.begin(), y.end(), s.begin() + kFftLengthBy2,
|
| e_shadow.begin(),
|
| [&](float a, float b) { return a - b * kScale; });
|
| - std::for_each(e_shadow.begin(), e_shadow.end(), [](float& a) {
|
| - a = std::max(std::min(a, 32767.0f), -32768.0f);
|
| - });
|
| + std::for_each(e_shadow.begin(), e_shadow.end(),
|
| + [](float& a) { a = rtc::SafeClamp(-32768.f, 32767.f, a); });
|
| fft.ZeroPaddedFft(e_shadow, &E_shadow);
|
|
|
| shadow_gain.Compute(render_buffer, render_signal_analyzer, E_shadow,
|
|
|