Chromium Code Reviews| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 protected: | 125 protected: |
| 126 virtual ~EventHandler() {} | 126 virtual ~EventHandler() {} |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 // A synchronous writer interface used by AudioInputController for | 129 // A synchronous writer interface used by AudioInputController for |
| 130 // synchronous writing. | 130 // synchronous writing. |
| 131 class SyncWriter { | 131 class SyncWriter { |
| 132 public: | 132 public: |
| 133 virtual ~SyncWriter() {} | 133 virtual ~SyncWriter() {} |
| 134 | 134 |
| 135 // Notify the synchronous writer about the number of bytes in the | 135 // Write certain amount of data from |data| and notify the synchronous |
| 136 // soundcard which has been recorded. | 136 // writer on the number of bytes in the sound card which has been recorded. |
|
tommi (sloooow) - chröme
2014/08/29 09:16:43
grammar nit: // writer of the number of bytes that
no longer working on chromium
2014/08/29 11:14:16
The previous comments are just wrong, I tried corr
| |
| 137 virtual void UpdateRecordedBytes(uint32 bytes) = 0; | |
| 138 | |
| 139 // Write certain amount of data from |data|. | |
| 140 virtual void Write(const AudioBus* data, | 137 virtual void Write(const AudioBus* data, |
| 141 double volume, | 138 double volume, |
| 142 bool key_pressed) = 0; | 139 bool key_pressed, |
| 140 uint32 bytes) = 0; | |
| 143 | 141 |
| 144 // Close this synchronous writer. | 142 // Close this synchronous writer. |
| 145 virtual void Close() = 0; | 143 virtual void Close() = 0; |
| 146 }; | 144 }; |
| 147 | 145 |
| 148 // AudioInputController::Create() can use the currently registered Factory | 146 // AudioInputController::Create() can use the currently registered Factory |
| 149 // to create the AudioInputController. Factory is intended for testing only. | 147 // to create the AudioInputController. Factory is intended for testing only. |
| 150 // |user_input_monitor| is used for typing detection and can be NULL. | 148 // |user_input_monitor| is used for typing detection and can be NULL. |
| 151 class Factory { | 149 class Factory { |
| 152 public: | 150 public: |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 #endif | 365 #endif |
| 368 | 366 |
| 369 size_t prev_key_down_count_; | 367 size_t prev_key_down_count_; |
| 370 | 368 |
| 371 DISALLOW_COPY_AND_ASSIGN(AudioInputController); | 369 DISALLOW_COPY_AND_ASSIGN(AudioInputController); |
| 372 }; | 370 }; |
| 373 | 371 |
| 374 } // namespace media | 372 } // namespace media |
| 375 | 373 |
| 376 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 374 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
| OLD | NEW |