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

Unified Diff: media/filters/audio_renderer_impl.cc

Issue 174584: Make audio and video in sync while playback rate != 1.0... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/audio_renderer_impl.cc
===================================================================
--- media/filters/audio_renderer_impl.cc (revision 24557)
+++ media/filters/audio_renderer_impl.cc (working copy)
@@ -57,6 +57,7 @@
// TODO(scherkus): Maybe change OnMoreData to pass in char/uint8 or similar.
// TODO(fbarchard): Waveout_output_win.h should handle zero length buffers
// without clicking.
fbarchard 2009/08/27 03:21:18 we can probably remove this todo, now that we have
+ pending_bytes = static_cast<int>(pending_bytes * GetPlaybackRate());
scherkus (not reviewing) 2009/08/26 23:59:00 same here.. ceil() perhaps?
base::TimeDelta delay = base::TimeDelta::FromMicroseconds(
base::Time::kMicrosecondsPerSecond * pending_bytes / bytes_per_second_);
fbarchard 2009/08/27 03:21:18 this can come close to overflowing an int can't it
return FillBuffer(static_cast<uint8*>(dest_void), len, delay);
« chrome/renderer/media/audio_renderer_impl.cc ('K') | « chrome/renderer/media/audio_renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698