Index: webrtc/modules/audio_processing/level_controller/level_controller.cc |
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller.cc b/webrtc/modules/audio_processing/level_controller/level_controller.cc |
index 028501c5c03bd3e3904710d275f65855d02be6f1..6edae5c38a8039b72c3df2a62a1815f1bda0ed7a 100644 |
--- a/webrtc/modules/audio_processing/level_controller/level_controller.cc |
+++ b/webrtc/modules/audio_processing/level_controller/level_controller.cc |
@@ -49,7 +49,7 @@ float FrameEnergy(const AudioBuffer& audio) { |
for (size_t k = 0; k < audio.num_channels(); ++k) { |
float channel_energy = |
std::accumulate(audio.channels_const_f()[k], |
- audio.channels_const_f()[k] + audio.num_frames(), 0, |
+ audio.channels_const_f()[k] + audio.num_frames(), 0.f, |
saza WebRTC
2017/09/05 09:35:20
Good find. Fyi, aleloi@ or hlundin@ are the least
|
[](float a, float b) -> float { return a + b * b; }); |
energy = std::max(channel_energy, energy); |
} |