diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 02:50:38 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 02:50:38 +0000 |
commit | 938ecf4550bd9011cf006a1f0239b3c786304bac (patch) | |
tree | 423a1f648dd14f734705ea76a2f908a5ea00f289 /media/audio/audio_output.h | |
parent | c137292f1790329b838e857135dac7fe80f504cf (diff) | |
download | chromium_src-938ecf4550bd9011cf006a1f0239b3c786304bac.zip chromium_src-938ecf4550bd9011cf006a1f0239b3c786304bac.tar.gz chromium_src-938ecf4550bd9011cf006a1f0239b3c786304bac.tar.bz2 |
Revert r21137 to fix Chromium mac valgrind
TBR=scherkus
Review URL: http://codereview.chromium.org/159122
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21154 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_output.h')
-rw-r--r-- | media/audio/audio_output.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/media/audio/audio_output.h b/media/audio/audio_output.h index a12742e..4793e71 100644 --- a/media/audio/audio_output.h +++ b/media/audio/audio_output.h @@ -91,7 +91,9 @@ class AudioOutputStream { // Starts playing audio and generating AudioSourceCallback::OnMoreData(). // Since implementor of AudioOutputStream may have internal buffers, right - // after calling this method initial buffers are fetched. + // after calling this method initial buffers are fetched. User of this + // object should prepare |AudioOutputStream::GetNumBuffers()| before calling + // AudioOutputStream::Start(). // // The output stream does not take ownership of this callback. virtual void Start(AudioSourceCallback* callback) = 0; @@ -112,6 +114,11 @@ class AudioOutputStream { // After calling this method, the object should not be used anymore. virtual void Close() = 0; + // Gets the number of internal buffers used in this output stream. This + // method is useful for providing information about how user of this object + // should prepare initial buffers before calling AudioOutputStream::Start(). + virtual size_t GetNumBuffers() = 0; + protected: virtual ~AudioOutputStream() {} }; @@ -157,6 +164,11 @@ class AudioManager { virtual void MuteAll() = 0; virtual void UnMuteAll() = 0; + // For testing purposes only. Returns the internal buffer of the last + // AUDIO_MOCK AudioOutputStream closed. Returns NULL if none closed yet. + // The buffer size is the same as passed to AudioOutputStream::Open(). + virtual const void* GetLastMockBuffer() = 0; + // Get AudioManager singleton. // TODO(cpu): Define threading requirements for interacting with AudioManager. static AudioManager* GetAudioManager(); |