diff options
author | grunell <grunell@chromium.org> | 2015-12-14 01:52:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-14 09:53:19 +0000 |
commit | db03a8d1128783ff4803364ba616ae5fac8822f7 (patch) | |
tree | fa0eec2acc5818b93c089bcc37d643e5c13deed1 /media/renderers | |
parent | b4f1d4eb29f6580db9cba6af36f4fd7a0c96f861 (diff) | |
download | chromium_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.cc | 3 | ||||
-rw-r--r-- | media/renderers/audio_renderer_impl.h | 4 |
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 |