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

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

Issue 11098031: Get PulseAudio implementation working. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cork. BeginWrite. Cleanup. Created 8 years, 2 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
« no previous file with comments | « no previous file | media/audio/pulse/pulse_output.h » ('j') | media/audio/pulse/pulse_output.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // plugins. In any case, data is usually immediately available, 83 // plugins. In any case, data is usually immediately available,
84 // so there would be no delay. 84 // so there would be no delay.
85 virtual void WaitTillDataReady() {} 85 virtual void WaitTillDataReady() {}
86 86
87 protected: 87 protected:
88 virtual ~AudioSourceCallback() {} 88 virtual ~AudioSourceCallback() {}
89 }; 89 };
90 90
91 virtual ~AudioOutputStream() {} 91 virtual ~AudioOutputStream() {}
92 92
93 // Open the stream. false is returned if the stream cannot be opened. 93 // Open the stream. false is returned if the stream cannot be opened. Open()
94 // must always be followed by a call to Close() even if Open() fails.
scherkus (not reviewing) 2012/10/11 20:19:31 this makes me sad considering we return true/false
DaleCurtis 2012/10/12 00:09:12 Yeah, it's not ideal. At least the comment codifi
94 virtual bool Open() = 0; 95 virtual bool Open() = 0;
95 96
96 // Starts playing audio and generating AudioSourceCallback::OnMoreData(). 97 // Starts playing audio and generating AudioSourceCallback::OnMoreData().
97 // Since implementor of AudioOutputStream may have internal buffers, right 98 // Since implementor of AudioOutputStream may have internal buffers, right
98 // after calling this method initial buffers are fetched. 99 // after calling this method initial buffers are fetched.
99 // 100 //
100 // The output stream does not take ownership of this callback. 101 // The output stream does not take ownership of this callback.
101 virtual void Start(AudioSourceCallback* callback) = 0; 102 virtual void Start(AudioSourceCallback* callback) = 0;
102 103
103 // Stops playing audio. Effect might not be instantaneous as the hardware 104 // Stops playing audio. Effect might not be instantaneous as the hardware
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Sets the Automatic Gain Control (AGC) state. 175 // Sets the Automatic Gain Control (AGC) state.
175 virtual void SetAutomaticGainControl(bool enabled) = 0; 176 virtual void SetAutomaticGainControl(bool enabled) = 0;
176 177
177 // Returns the Automatic Gain Control (AGC) state. 178 // Returns the Automatic Gain Control (AGC) state.
178 virtual bool GetAutomaticGainControl() = 0; 179 virtual bool GetAutomaticGainControl() = 0;
179 }; 180 };
180 181
181 } // namespace media 182 } // namespace media
182 183
183 #endif // MEDIA_AUDIO_AUDIO_IO_H_ 184 #endif // MEDIA_AUDIO_AUDIO_IO_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/pulse/pulse_output.h » ('j') | media/audio/pulse/pulse_output.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698