Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Side by Side Diff: media/audio/audio_io.h

Issue 16103007: Privitize WaitTillDataReady() and DataReady(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gotta catch'em all! Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_IO_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_IO_H_
6 #define MEDIA_AUDIO_AUDIO_IO_H_ 6 #define MEDIA_AUDIO_AUDIO_IO_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "media/audio/audio_buffers_state.h" 9 #include "media/audio/audio_buffers_state.h"
10 #include "media/base/audio_bus.h" 10 #include "media/base/audio_bus.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual int OnMoreIOData(AudioBus* source, 66 virtual int OnMoreIOData(AudioBus* source,
67 AudioBus* dest, 67 AudioBus* dest,
68 AudioBuffersState buffers_state) = 0; 68 AudioBuffersState buffers_state) = 0;
69 69
70 // There was an error while playing a buffer. Audio source cannot be 70 // There was an error while playing a buffer. Audio source cannot be
71 // destroyed yet. No direct action needed by the AudioStream, but it is 71 // destroyed yet. No direct action needed by the AudioStream, but it is
72 // a good place to stop accumulating sound data since is is likely that 72 // a good place to stop accumulating sound data since is is likely that
73 // playback will not continue. 73 // playback will not continue.
74 virtual void OnError(AudioOutputStream* stream) = 0; 74 virtual void OnError(AudioOutputStream* stream) = 0;
75 75
76 // Will block until the client has written its audio data or 1.5 seconds
77 // have elapsed.
78 virtual void WaitTillDataReady() {}
79
80 protected: 76 protected:
81 virtual ~AudioSourceCallback() {} 77 virtual ~AudioSourceCallback() {}
82 }; 78 };
83 79
84 virtual ~AudioOutputStream() {} 80 virtual ~AudioOutputStream() {}
85 81
86 // Open the stream. false is returned if the stream cannot be opened. Open() 82 // Open the stream. false is returned if the stream cannot be opened. Open()
87 // must always be followed by a call to Close() even if Open() fails. 83 // must always be followed by a call to Close() even if Open() fails.
88 virtual bool Open() = 0; 84 virtual bool Open() = 0;
89 85
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Sets the Automatic Gain Control (AGC) state. 163 // Sets the Automatic Gain Control (AGC) state.
168 virtual void SetAutomaticGainControl(bool enabled) = 0; 164 virtual void SetAutomaticGainControl(bool enabled) = 0;
169 165
170 // Returns the Automatic Gain Control (AGC) state. 166 // Returns the Automatic Gain Control (AGC) state.
171 virtual bool GetAutomaticGainControl() = 0; 167 virtual bool GetAutomaticGainControl() = 0;
172 }; 168 };
173 169
174 } // namespace media 170 } // namespace media
175 171
176 #endif // MEDIA_AUDIO_AUDIO_IO_H_ 172 #endif // MEDIA_AUDIO_AUDIO_IO_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/audio_sync_reader.cc ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698