summaryrefslogtreecommitdiffstats
path: root/media/audio/simple_sources.h
diff options
context:
space:
mode:
authorgrunell <grunell@chromium.org>2015-12-18 03:28:21 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-18 11:29:19 +0000
commit09a6d7939e02a3b892d3eeaac95c5f0fc36e7e72 (patch)
tree82e8ecc62499e9452d16bbcc9fb1ab70ad785884 /media/audio/simple_sources.h
parentbbebdda2945f809f53ecdd41100a315ed3265532 (diff)
downloadchromium_src-09a6d7939e02a3b892d3eeaac95c5f0fc36e7e72.zip
chromium_src-09a6d7939e02a3b892d3eeaac95c5f0fc36e7e72.tar.gz
chromium_src-09a6d7939e02a3b892d3eeaac95c5f0fc36e7e72.tar.bz2
Forward the number of skipped frames by the OS in audio playout.
* Introduce AudioOutputBufferParameters in media/audio/audio_parameters.h. This contains number of skipped frames. * Change the shared memory to hold AudioOutputBufferParameters before the audio data. * Forward skipped frames by OS on Mac over IPC. Not yet used by any client. This relands https://codereview.chromium.org/1487983002/ which was reverted due to crackling flash (pepper) audio. Original CL is in patch set 1. Will be done in follow-up CLs: * Forward skipped frames by OS on Windows. * Forward skipped frames to the WebRTC AEC. BUG=560371 TBR=dalecurtis@chromium.org,ckehoe@chromium.org (no changes from original CL) Review URL: https://codereview.chromium.org/1538563002 Cr-Commit-Position: refs/heads/master@{#366078}
Diffstat (limited to 'media/audio/simple_sources.h')
-rw-r--r--media/audio/simple_sources.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/media/audio/simple_sources.h b/media/audio/simple_sources.h
index 7a10a34..075b4a7 100644
--- a/media/audio/simple_sources.h
+++ b/media/audio/simple_sources.h
@@ -31,7 +31,9 @@ class MEDIA_EXPORT SineWaveAudioSource
void Reset();
// Implementation of AudioSourceCallback.
- int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override;
+ int OnMoreData(AudioBus* audio_bus,
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) override;
void OnError(AudioOutputStream* stream) override;
// The number of OnMoreData() and OnError() calls respectively.
@@ -56,7 +58,9 @@ class MEDIA_EXPORT FileSource : public AudioOutputStream::AudioSourceCallback,
~FileSource() override;
// Implementation of AudioSourceCallback.
- int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override;
+ int OnMoreData(AudioBus* audio_bus,
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) override;
void OnError(AudioOutputStream* stream) override;
private:
@@ -87,7 +91,9 @@ class BeepingSource : public AudioOutputStream::AudioSourceCallback {
~BeepingSource() override;
// Implementation of AudioSourceCallback.
- int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override;
+ int OnMoreData(AudioBus* audio_bus,
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) override;
void OnError(AudioOutputStream* stream) override;
static void BeepOnce();