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

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

Issue 15563004: Improved AGC update scheme for the audio backend in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 7 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Sets the relative volume, with range [0.0, 1.0] inclusive. 101 // Sets the relative volume, with range [0.0, 1.0] inclusive.
102 virtual void SetVolume(double volume) = 0; 102 virtual void SetVolume(double volume) = 0;
103 103
104 // Gets the relative volume, with range [0.0, 1.0] inclusive. 104 // Gets the relative volume, with range [0.0, 1.0] inclusive.
105 virtual void GetVolume(double* volume) = 0; 105 virtual void GetVolume(double* volume) = 0;
106 106
107 // Close the stream. This also generates AudioSourceCallback::OnClose(). 107 // Close the stream. This also generates AudioSourceCallback::OnClose().
108 // After calling this method, the object should not be used anymore. 108 // After calling this method, the object should not be used anymore.
109 virtual void Close() = 0; 109 virtual void Close() = 0;
110
111 // Sets the Automatic Gain Control (AGC) state.
112 // Utilized in live-audio (unified) IO mode.
113 virtual void SetAutomaticGainControl(bool enabled) {}
tommi (sloooow) - chröme 2013/05/24 18:21:11 pure virtual?
henrika (OOO until Aug 14) 2013/05/27 12:17:43 Actually the idea was to add these in a follow-up
114
115 // Returns the Automatic Gain Control (AGC) state.
116 // Utilized in live-audio (unified) IO mode.
117 virtual bool GetAutomaticGainControl() { return false; }
tommi (sloooow) - chröme 2013/05/24 18:21:11 same here
henrika (OOO until Aug 14) 2013/05/27 12:17:43 see above
110 }; 118 };
111 119
112 // Models an audio sink receiving recorded audio from the audio driver. 120 // Models an audio sink receiving recorded audio from the audio driver.
113 class MEDIA_EXPORT AudioInputStream { 121 class MEDIA_EXPORT AudioInputStream {
114 public: 122 public:
115 class MEDIA_EXPORT AudioInputCallback { 123 class MEDIA_EXPORT AudioInputCallback {
116 public: 124 public:
117 // Called by the audio recorder when a full packet of audio data is 125 // Called by the audio recorder when a full packet of audio data is
118 // available. This is called from a special audio thread and the 126 // available. This is called from a special audio thread and the
119 // implementation should return as soon as possible. 127 // implementation should return as soon as possible.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Sets the Automatic Gain Control (AGC) state. 175 // Sets the Automatic Gain Control (AGC) state.
168 virtual void SetAutomaticGainControl(bool enabled) = 0; 176 virtual void SetAutomaticGainControl(bool enabled) = 0;
169 177
170 // Returns the Automatic Gain Control (AGC) state. 178 // Returns the Automatic Gain Control (AGC) state.
171 virtual bool GetAutomaticGainControl() = 0; 179 virtual bool GetAutomaticGainControl() = 0;
172 }; 180 };
173 181
174 } // namespace media 182 } // namespace media
175 183
176 #endif // MEDIA_AUDIO_AUDIO_IO_H_ 184 #endif // MEDIA_AUDIO_AUDIO_IO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698