OLD | NEW |
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_INPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 // Sets the Automatic Gain Control (AGC) state of the input stream. | 225 // Sets the Automatic Gain Control (AGC) state of the input stream. |
226 // Changing the AGC state is not supported while recording is active. | 226 // Changing the AGC state is not supported while recording is active. |
227 virtual void SetAutomaticGainControl(bool enabled); | 227 virtual void SetAutomaticGainControl(bool enabled); |
228 | 228 |
229 // AudioInputCallback implementation. Threading details depends on the | 229 // AudioInputCallback implementation. Threading details depends on the |
230 // device-specific implementation. | 230 // device-specific implementation. |
231 virtual void OnData(AudioInputStream* stream, | 231 virtual void OnData(AudioInputStream* stream, |
232 const AudioBus* source, | 232 const AudioBus* source, |
233 uint32 hardware_delay_bytes, | 233 uint32 hardware_delay_bytes, |
234 double volume) OVERRIDE; | 234 double volume) override; |
235 virtual void OnError(AudioInputStream* stream) OVERRIDE; | 235 virtual void OnError(AudioInputStream* stream) override; |
236 | 236 |
237 bool SharedMemoryAndSyncSocketMode() const { return sync_writer_ != NULL; } | 237 bool SharedMemoryAndSyncSocketMode() const { return sync_writer_ != NULL; } |
238 | 238 |
239 protected: | 239 protected: |
240 friend class base::RefCountedThreadSafe<AudioInputController>; | 240 friend class base::RefCountedThreadSafe<AudioInputController>; |
241 | 241 |
242 // Internal state of the source. | 242 // Internal state of the source. |
243 enum State { | 243 enum State { |
244 CREATED, | 244 CREATED, |
245 RECORDING, | 245 RECORDING, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 371 |
372 // Time when a low-latency stream is created. | 372 // Time when a low-latency stream is created. |
373 base::TimeTicks low_latency_create_time_; | 373 base::TimeTicks low_latency_create_time_; |
374 | 374 |
375 DISALLOW_COPY_AND_ASSIGN(AudioInputController); | 375 DISALLOW_COPY_AND_ASSIGN(AudioInputController); |
376 }; | 376 }; |
377 | 377 |
378 } // namespace media | 378 } // namespace media |
379 | 379 |
380 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 380 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
OLD | NEW |