New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 774488 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Add tracing to better understand WASAPIAudioInputStream performance

Project Member Reported by maxmorin@chromium.org, Oct 13 2017

Issue description

WASAPIAudioInputStream has both a fifo and an AudioConverter [1] (which in turn has its own fifo or a resampler). It would be nice to have some tracing for things like how much data is buffered/pushed/pulled for each of the fifos. For the case when resampling is needed, it might be good to know what parameters we are actually using, and what parameters were requested. Whether resampling is used is determined in DesiredFormatIsSupported [2], note that the name is somewhat misleading as the function actually figures out what parameters to use if the supplied parameters doesn't work.

[1] https://cs.chromium.org/chromium/src/media/audio/win/audio_low_latency_input_win.h?l=241
[2] https://cs.chromium.org/chromium/src/media/audio/win/audio_low_latency_input_win.cc?l=613
 
I recommended the current approach to tommi@ when he wrote this earlier this year (I think?). The fifo it uses is specifically designed to minimize conversions and copies. You wouldn't be able to use the fifo in AudioConverter as efficiently.
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4cf4051eda59bf649980ffa0d8a174991f752e48

commit 4cf4051eda59bf649980ffa0d8a174991f752e48
Author: Marina Ciocea <marinaciocea@chromium.org>
Date: Tue Oct 24 14:28:31 2017

Add WASAPIAudioInputStream tracing

Add tracing about how much data is pushed to and consumed from
WASAPIAudioInputStream fifo and AudioConverter fifo. Add tracing
with configured and requested sample rate, when resampling is used.

R=maxmorin@chromium.org, olka@chromium.org

Bug:  774488 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I5aeb5f909742adbeb87e19642d3c7bf173552ae8
Reviewed-on: https://chromium-review.googlesource.com/733085
Reviewed-by: Max Morin <maxmorin@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511139}
[modify] https://crrev.com/4cf4051eda59bf649980ffa0d8a174991f752e48/media/audio/audio_input_controller.cc
[modify] https://crrev.com/4cf4051eda59bf649980ffa0d8a174991f752e48/media/audio/win/audio_low_latency_input_win.cc
[modify] https://crrev.com/4cf4051eda59bf649980ffa0d8a174991f752e48/media/base/audio_block_fifo.cc
[modify] https://crrev.com/4cf4051eda59bf649980ffa0d8a174991f752e48/media/base/audio_converter.cc

Status: Fixed (was: Started)

Sign in to add a comment