diff options
Diffstat (limited to 'chrome/renderer/media/audio_renderer_impl.cc')
-rw-r--r-- | chrome/renderer/media/audio_renderer_impl.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/renderer/media/audio_renderer_impl.cc b/chrome/renderer/media/audio_renderer_impl.cc index 783acf3..6b1ecf0 100644 --- a/chrome/renderer/media/audio_renderer_impl.cc +++ b/chrome/renderer/media/audio_renderer_impl.cc @@ -291,6 +291,13 @@ void AudioRendererImpl::OnNotifyPacketReady() { } } + // 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); |