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

Unified Diff: chrome/renderer/media/audio_renderer_impl.cc

Issue 176049: Merge 24568 - Make audio and video in sync while playback rate != 1.0... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/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
« no previous file with comments | « no previous file | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/audio_renderer_impl.cc
===================================================================
--- chrome/renderer/media/audio_renderer_impl.cc (revision 24963)
+++ chrome/renderer/media/audio_renderer_impl.cc (working copy)
@@ -291,6 +291,13 @@
}
}
+ // Finally we need to adjust the delay according to playback rate.
+ if (GetPlaybackRate() != 1.0f) {
+ request_delay = base::TimeDelta::FromMicroseconds(
+ static_cast<int64>(ceil(request_delay.InMicroseconds() *
+ GetPlaybackRate())));
+ }
+
size_t filled = FillBuffer(static_cast<uint8*>(shared_memory_->memory()),
shared_memory_size_,
request_delay);
Property changes on: chrome\renderer\media\audio_renderer_impl.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/renderer/media/audio_renderer_impl.cc:r24568
« no previous file with comments | « no previous file | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698