Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Issue 661693003: Avoid reporting 0 as input level when AudioProcessing zero out the audio data (Closed)

Created:
6 years, 2 months ago by no longer working on chromium
Modified:
6 years, 2 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Avoid 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -15 lines) Patch
M content/renderer/media/media_stream_audio_level_calculator.h View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download
M content/renderer/media/media_stream_audio_level_calculator.cc View 1 2 3 2 chunks +7 lines, -4 lines 0 comments Download
M content/renderer/media/speech_recognition_audio_sink_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webaudio_capturer_source.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/media/webrtc_audio_capturer.cc View 1 2 3 4 chunks +29 lines, -3 lines 0 comments Download
M content/renderer/media/webrtc_local_audio_track.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/webrtc_local_audio_track.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
no longer working on chromium
Tommi, please review, thanks.
6 years, 2 months ago (2014-10-16 12:59:33 UTC) #2
no longer working on chromium
Tommi, please take a look.
6 years, 2 months ago (2014-10-17 08:37:58 UTC) #3
tommi (sloooow) - chröme
https://codereview.chromium.org/661693003/diff/40001/content/renderer/media/media_stream_audio_level_calculator.h File content/renderer/media/media_stream_audio_level_calculator.h (right): https://codereview.chromium.org/661693003/diff/40001/content/renderer/media/media_stream_audio_level_calculator.h#newcode25 content/renderer/media/media_stream_audio_level_calculator.h:25: int number_of_frames, bool has_energy); can you add documentation for ...
6 years, 2 months ago (2014-10-17 11:59:08 UTC) #4
no longer working on chromium
Hi Tommi, how about force_report_nonzero_energy ? On Oct 17, 2014 1:59 PM, <tommi@chromium.org> wrote: > ...
6 years, 2 months ago (2014-10-17 14:57:43 UTC) #5
tommi (sloooow) - chröme
Sure. As long as it's also documented well, that should make things clear. On Fri ...
6 years, 2 months ago (2014-10-17 15:47:57 UTC) #6
no longer working on chromium
Tommi, could you please look at the name of the variable and comment? Thanks, SX ...
6 years, 2 months ago (2014-10-20 08:08:42 UTC) #7
tommi (sloooow) - chröme
lgtm % one nit https://codereview.chromium.org/661693003/diff/60001/content/renderer/media/media_stream_audio_level_calculator.h File content/renderer/media/media_stream_audio_level_calculator.h (right): https://codereview.chromium.org/661693003/diff/60001/content/renderer/media/media_stream_audio_level_calculator.h#newcode25 content/renderer/media/media_stream_audio_level_calculator.h:25: // report nonzero energy. Since ...
6 years, 2 months ago (2014-10-20 15:40:17 UTC) #8
no longer working on chromium
https://codereview.chromium.org/661693003/diff/60001/content/renderer/media/media_stream_audio_level_calculator.h File content/renderer/media/media_stream_audio_level_calculator.h (right): https://codereview.chromium.org/661693003/diff/60001/content/renderer/media/media_stream_audio_level_calculator.h#newcode25 content/renderer/media/media_stream_audio_level_calculator.h:25: // report nonzero energy. Since |audio_data| is post processed ...
6 years, 2 months ago (2014-10-20 15:45:46 UTC) #10
no longer working on chromium
thanks, landing now.
6 years, 2 months ago (2014-10-20 15:45:56 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/661693003/100001
6 years, 2 months ago (2014-10-20 15:47:00 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:100001)
6 years, 2 months ago (2014-10-20 16:35:03 UTC) #14
commit-bot: I haz the power
6 years, 2 months ago (2014-10-20 16:35:51 UTC) #15
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ba5b0d78589ce6b41bade5f71f5f9657c2beef3d
Cr-Commit-Position: refs/heads/master@{#300274}

Powered by Google App Engine
This is Rietveld 408576698