Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 157901 Loop latency regression with renderer side mixing.
Starred by 2 users Project Member Reported by dalecur...@chromium.org, Oct 25 2012 Back to list
Status: WontFix
Owner:
Closed: Oct 2012
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment
Renderer side mixing seems to be introducing a floor for ended events of ~70ms; per Shadi:

"That is the average latency added to playtime to get the ended event. The audio is 140ms, so it means that in average the ended event is fired after 210ms of hitting play."

http://build.chromium.org/f/chromium/perf/win-release/media_tests_av_perf/report.html?history=150&rev=163808
 
Labels: Mstone-24
tentatively marking as m24 so we don't forget about this
Looks like this is related to the calculation of |earliest_end_time_| I suspect the new callbacks are so frequent that we're being restricted by earliest_end_time_ more frequently (either correctly or incorrectly)
Cc: henrika@chromium.org crogers@google.com
Hmm, I suspect everything is working as expected and we're just getting more accurate timing data now.

I can't find any issue with the latency calculation on Windows, except that it might be off by one buffer (~10), but that's not enough to cause the ~70 floor we're seeing.  With some logging it can be seen that the delay reported by the output device is ~40ms and that the value is properly sent to the renderer side:

[ RUN        ] audio_latency_perf.AudioLatencyPerfTest.testAudioLatency: "Launches HTML test which runs the audio latency test."
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716010 Duration: 10 Delay: 0
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 30
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716045 Duration: 10 Delay: 30
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.0907
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716065 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.9773
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716075 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.0227
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716085 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.0227
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716096 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.9773
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716106 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.8866
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716115 Duration: 10 Delay: 39
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.1134
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716126 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.9546
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716136 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.1587
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716146 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.068
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716157 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.932
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716167 Duration: 10 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.9546
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(570)] End: 12995763716174 Duration: 7 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.9773
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(496)] Should End? Now: 12995763716137 End: 12995763716174 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 39.9546
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(496)] Should End? Now: 12995763716147 End: 12995763716174 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.0454
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(496)] Should End? Now: 12995763716157 End: 12995763716174 Delay: 40
[1856:11212:1026/152156:ERROR:audio_low_latency_output_win.cc(613)] frame delay: 40.0907
[10312:21180:1026/152156:ERROR:audio_renderer_impl.cc(496)] Should End? Now: 12995763716167 End: 12995763716174 Delay: 40

+henrika to confirm if ~40ms is the expected latency value for WASAPI output.

Out of the 70ms, that leaves 30ms leftover from the time |ended_cb_| is fired until the seeked event makes it to javascript; which doesn't seem unreasonable.

Running the test with --chrome-flags="--disable-renderer-side-mixing --disable-audio-output-resampler" yields the original results, but to my ears it seems like we might be counting too fast and not actually waiting for the stream to complete playing due to the lower resolution timing data.
Status: WontFix
scherkus made the observation that windows now performs identically to the mac which has always had a solid audio implementation ==> implying our previous measurement might have been bunk.

Closing as WontFix unless anyone has something else to say.
Comment 5 by shadi@google.com, Nov 12 2012
I am *not* reopening this bug.

Dale, since this latency measurement is not very accurate, maybe we should work on adapting something like http://code.google.com/p/chromium-os/issues/detail?id=32898#c15

This is for CROS, so it should work for linux.  I can adapt it with the recording mechanism I used in audio_pesq tests to run it on windows...
Project Member Comment 6 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -Feature-Media-Audio -Mstone-24 Cr-Content Cr-Internals-Media-Audio M-24
Project Member Comment 7 by bugdroid1@chromium.org, Apr 5 2013
Labels: -Cr-Content Cr-Blink
Sign in to add a comment