summaryrefslogtreecommitdiffstats
path: root/media/renderers
diff options
context:
space:
mode:
authorgrunell <grunell@chromium.org>2015-12-14 01:52:11 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-14 09:53:19 +0000
commitdb03a8d1128783ff4803364ba616ae5fac8822f7 (patch)
treefa0eec2acc5818b93c089bcc37d643e5c13deed1 /media/renderers
parentb4f1d4eb29f6580db9cba6af36f4fd7a0c96f861 (diff)
downloadchromium_src-db03a8d1128783ff4803364ba616ae5fac8822f7.zip
chromium_src-db03a8d1128783ff4803364ba616ae5fac8822f7.tar.gz
chromium_src-db03a8d1128783ff4803364ba616ae5fac8822f7.tar.bz2
Forward the number of skipped frames by the OS in audio playout.
* Only for Mac. Will be done in follow-up CLs: * Windows. * Hooking this up to the AEC. BUG=560371 Review URL: https://codereview.chromium.org/1487983002 Cr-Commit-Position: refs/heads/master@{#364990}
Diffstat (limited to 'media/renderers')
-rw-r--r--media/renderers/audio_renderer_impl.cc3
-rw-r--r--media/renderers/audio_renderer_impl.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index db1948e..424b2d3 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -626,7 +626,8 @@ bool AudioRendererImpl::IsBeforeStartTime(
}
int AudioRendererImpl::Render(AudioBus* audio_bus,
- int audio_delay_milliseconds) {
+ uint32_t audio_delay_milliseconds,
+ uint32_t frames_skipped) {
const int requested_frames = audio_bus->frames();
base::TimeDelta playback_delay = base::TimeDelta::FromMilliseconds(
audio_delay_milliseconds);
diff --git a/media/renderers/audio_renderer_impl.h b/media/renderers/audio_renderer_impl.h
index de0cbda..7674851 100644
--- a/media/renderers/audio_renderer_impl.h
+++ b/media/renderers/audio_renderer_impl.h
@@ -151,7 +151,9 @@ class MEDIA_EXPORT AudioRendererImpl
// timestamp in the pipeline will be ahead of the actual audio playback. In
// this case |audio_delay_milliseconds| should be used to indicate when in the
// future should the filled buffer be played.
- int Render(AudioBus* audio_bus, int audio_delay_milliseconds) override;
+ int Render(AudioBus* audio_bus,
+ uint32_t audio_delay_milliseconds,
+ uint32_t frames_skipped) override;
void OnRenderError() override;
// Helper methods that schedule an asynchronous read from the decoder as long