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

Issue 174584: Make audio and video in sync while playback rate != 1.0... (Closed)

Created:
11 years, 4 months ago by Alpha Left Google
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, fbarchard, Alpha Left Google, jam, awong, darin (slow to review), brettw, scherkus (not reviewing)
Visibility:
Public.

Description

Make audio and video in sync while playback rate != 1.0 BUG=20290 TEST=play a video with rate 0.5, audio and video should be in sync This change use the playback rate as a scaling factor for delay introduced in the audio hardware buffer. After we scaled the amount of audio buffer not played, we'll be able to make audio / video in sync again. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24568

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -0 lines) Patch
M chrome/renderer/media/audio_renderer_impl.cc View 1 chunk +7 lines, -0 lines 2 comments Download
M media/filters/audio_renderer_impl.cc View 1 chunk +1 line, -0 lines 3 comments Download

Messages

Total messages: 3 (0 generated)
Alpha Left Google
After doing some experiments, by scaling the unplayed bytes in audio hardware buffer, we can ...
11 years, 4 months ago (2009-08-26 23:44:09 UTC) #1
scherkus (not reviewing)
nits on floating point math but LGTM http://codereview.chromium.org/174584/diff/1/3 File chrome/renderer/media/audio_renderer_impl.cc (right): http://codereview.chromium.org/174584/diff/1/3#newcode297 Line 297: static_cast<int64>(request_delay.InMicroseconds() ...
11 years, 4 months ago (2009-08-26 23:59:00 UTC) #2
fbarchard
11 years, 4 months ago (2009-08-27 03:21:17 UTC) #3
build hasnt finished to confirm the fix... will have to test in the morning. 
just minor concerns

http://codereview.chromium.org/174584/diff/1/3
File chrome/renderer/media/audio_renderer_impl.cc (right):

http://codereview.chromium.org/174584/diff/1/3#newcode295
Line 295: if (GetPlaybackRate() != 1.0f) {
shouldnt you do this code within the 
if (current_time > request_timestamp_) {
above?

http://codereview.chromium.org/174584/diff/1/2
File media/filters/audio_renderer_impl.cc (right):

http://codereview.chromium.org/174584/diff/1/2#newcode59
Line 59: //                  without clicking.
we can probably remove this todo, now that we have triple buffering.  a single
zero packet wont cause a click.

http://codereview.chromium.org/174584/diff/1/2#newcode62
Line 62: base::Time::kMicrosecondsPerSecond * pending_bytes /
bytes_per_second_);
this can come close to overflowing an int can't it?

Powered by Google App Engine
This is Rietveld 408576698