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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 const AudioBus* data) = 0; | 122 const AudioBus* data) = 0; |
123 virtual void OnLog(AudioInputController* controller, | 123 virtual void OnLog(AudioInputController* controller, |
124 const std::string& message) = 0; | 124 const std::string& message) = 0; |
125 | 125 |
126 protected: | 126 protected: |
127 virtual ~EventHandler() {} | 127 virtual ~EventHandler() {} |
128 }; | 128 }; |
129 | 129 |
130 // A synchronous writer interface used by AudioInputController for | 130 // A synchronous writer interface used by AudioInputController for |
131 // synchronous writing. | 131 // synchronous writing. |
132 class SyncWriter { | 132 class MEDIA_EXPORT SyncWriter { |
133 public: | 133 public: |
134 virtual ~SyncWriter() {} | 134 virtual ~SyncWriter() {} |
135 | 135 |
136 // Write certain amount of data from |data|. | 136 // Write certain amount of data from |data|. |
137 virtual void Write(const AudioBus* data, | 137 virtual void Write(const AudioBus* data, |
138 double volume, | 138 double volume, |
139 bool key_pressed, | 139 bool key_pressed, |
140 uint32 hardware_delay_bytes) = 0; | 140 uint32 hardware_delay_bytes) = 0; |
141 | 141 |
142 // Close this synchronous writer. | 142 // Close this synchronous writer. |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 385 |
386 // Used for audio debug recordings. Accessed on audio thread. | 386 // Used for audio debug recordings. Accessed on audio thread. |
387 AudioInputWriter* input_writer_; | 387 AudioInputWriter* input_writer_; |
388 | 388 |
389 DISALLOW_COPY_AND_ASSIGN(AudioInputController); | 389 DISALLOW_COPY_AND_ASSIGN(AudioInputController); |
390 }; | 390 }; |
391 | 391 |
392 } // namespace media | 392 } // namespace media |
393 | 393 |
394 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ | 394 #endif // MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ |
OLD | NEW |