DescriptionAvoid reporting 0 as input level when AudioProcessing zero out the audio data.
When the microphone volume is low, the pre-processed audio data contains energy, while the post-processed audio data has only 0, we report 0 as energy before this patch, which is wrong since the audio flow contains energy.
This patch fix the problem by checking the energy of pre-processed data before reporting 0 as energy.
BUG=424149
TEST=1, use a USB headset.
2, set the microphone volume low, like below 50%.
3, join a hangout call.
4, open chrome://webrtc-internals, and look at the energy of input stream, constantly it is 0 there.
Committed: https://crrev.com/ba5b0d78589ce6b41bade5f71f5f9657c2beef3d
Cr-Commit-Position: refs/heads/master@{#300274}
Patch Set 1 #Patch Set 2 : check if the data is all zero #Patch Set 3 : fixed the unittests #
Total comments: 2
Patch Set 4 : fixed the variable name and comment. #
Total comments: 2
Patch Set 5 : fixed the comment, correct upload #Messages
Total messages: 15 (3 generated)
|