| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 const AudioParameters& params, | 144 const AudioParameters& params, |
| 145 const std::string& device_id, | 145 const std::string& device_id, |
| 146 // External synchronous writer for audio controller. | 146 // External synchronous writer for audio controller. |
| 147 SyncWriter* sync_writer); | 147 SyncWriter* sync_writer); |
| 148 | 148 |
| 149 // Factory method for creating an AudioInputController for low-latency mode, | 149 // Factory method for creating an AudioInputController for low-latency mode, |
| 150 // taking ownership of |stream|. The stream will be opened on the audio | 150 // taking ownership of |stream|. The stream will be opened on the audio |
| 151 // thread, and when that is done, the event handler will receive an | 151 // thread, and when that is done, the event handler will receive an |
| 152 // OnCreated() call from that same thread. | 152 // OnCreated() call from that same thread. |
| 153 static scoped_refptr<AudioInputController> CreateForStream( | 153 static scoped_refptr<AudioInputController> CreateForStream( |
| 154 AudioManager* audio_manager, | 154 const scoped_refptr<base::MessageLoopProxy>& message_loop, |
| 155 EventHandler* event_handler, | 155 EventHandler* event_handler, |
| 156 AudioInputStream* stream, | 156 AudioInputStream* stream, |
| 157 // External synchronous writer for audio controller. | 157 // External synchronous writer for audio controller. |
| 158 SyncWriter* sync_writer); | 158 SyncWriter* sync_writer); |
| 159 | 159 |
| 160 // Starts recording using the created audio input stream. | 160 // Starts recording using the created audio input stream. |
| 161 // This method is called on the creator thread. | 161 // This method is called on the creator thread. |
| 162 virtual void Record(); | 162 virtual void Record(); |
| 163 | 163 |
| 164 // Closes the audio input stream. The state is changed and the resources | 164 // Closes the audio input stream. The state is changed and the resources |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 static Factory* factory_; | 264 static Factory* factory_; |
| 265 | 265 |
| 266 double max_volume_; | 266 double max_volume_; |
| 267 | 267 |
| 268 DISALLOW_COPY_AND_ASSIGN(AudioInputController); | 268 DISALLOW_COPY_AND_ASSIGN(AudioInputController); |
| 269 }; | 269 }; |
| 270 | 270 |
| 271 } // namespace media | 271 } // namespace media |
| 272 | 272 |
| 273 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 273 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
| OLD | NEW |