summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_output.h
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 18:00:32 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 18:00:32 +0000
commit1328d55d94cf7b973da1a0a884735c8cbdeb2423 (patch)
treebbd05bc64668be46fc3804b8ce46d59ac8b44769 /media/audio/audio_output.h
parent21f659de19e3ea874a0958372a311746a0e764c2 (diff)
downloadchromium_src-1328d55d94cf7b973da1a0a884735c8cbdeb2423.zip
chromium_src-1328d55d94cf7b973da1a0a884735c8cbdeb2423.tar.gz
chromium_src-1328d55d94cf7b973da1a0a884735c8cbdeb2423.tar.bz2
Providing unplayed bytes in audio hardware buffer
BUG=20007 TEST=WinAudioTest.PCMWaveStreamPendingBytes We used to guess what is in the hardware audio buffer to perform audio sync. But due the triple buffering and other platforms has other buffering scheme we need to be able to know how many bytes are left in the hardware buffer. We provide this data via AudioCallback::OnMoreData(), so we can predict when the requested buffer will be played. Review URL: http://codereview.chromium.org/174243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_output.h')
-rw-r--r--media/audio/audio_output.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/audio/audio_output.h b/media/audio/audio_output.h
index f27858b..e6a1ee5 100644
--- a/media/audio/audio_output.h
+++ b/media/audio/audio_output.h
@@ -53,8 +53,10 @@ class AudioOutputStream {
// buffer size is usually what is specified in Open(). The source
// will return the number of bytes it filled. The expected structure of
// |dest| is platform and format specific.
- virtual size_t OnMoreData(AudioOutputStream* stream,
- void* dest, size_t max_size) = 0;
+ // |pending_bytes| is the number of bytes will be played before the
+ // requested data is played.
+ virtual size_t OnMoreData(AudioOutputStream* stream, void* dest,
+ size_t max_size, int pending_bytes) = 0;
// The stream is done with this callback. After this call the audio source
// can go away or be destroyed.