| 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_MANAGER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 // Limits the number of streams that can be created for testing purposes. | 187 // Limits the number of streams that can be created for testing purposes. |
| 188 virtual void SetMaxStreamCountForTesting(int max_input, int max_output); | 188 virtual void SetMaxStreamCountForTesting(int max_input, int max_output); |
| 189 | 189 |
| 190 protected: | 190 protected: |
| 191 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording); | 191 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording); |
| 192 friend class AudioDeviceInfoAccessorForTests; | 192 friend class AudioDeviceInfoAccessorForTests; |
| 193 | 193 |
| 194 explicit AudioManager(std::unique_ptr<AudioThread> audio_thread); | 194 explicit AudioManager(std::unique_ptr<AudioThread> audio_thread); |
| 195 | 195 |
| 196 virtual void ShutdownOnAudioThread() = 0; | 196 // Shuts down AudioManager on the audio thread; |immediately| is true if no |
| 197 // other tasks scheduled after this call will be executed. |
| 198 virtual void ShutdownOnAudioThread(bool immediately) = 0; |
| 197 | 199 |
| 198 // Initializes output debug recording. Can be called on any thread; will post | 200 // Initializes output debug recording. Can be called on any thread; will post |
| 199 // to the audio thread if not called on it. | 201 // to the audio thread if not called on it. |
| 200 virtual void InitializeOutputDebugRecording() = 0; | 202 virtual void InitializeOutputDebugRecording() = 0; |
| 201 | 203 |
| 202 // Returns true if the OS reports existence of audio devices. This does not | 204 // Returns true if the OS reports existence of audio devices. This does not |
| 203 // guarantee that the existing devices support all formats and sample rates. | 205 // guarantee that the existing devices support all formats and sample rates. |
| 204 virtual bool HasAudioOutputDevices() = 0; | 206 virtual bool HasAudioOutputDevices() = 0; |
| 205 | 207 |
| 206 // Returns true if the OS reports existence of audio recording devices. This | 208 // Returns true if the OS reports existence of audio recording devices. This |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 std::unique_ptr<AudioThread> audio_thread_; | 271 std::unique_ptr<AudioThread> audio_thread_; |
| 270 bool shutdown_ = false; // True after |this| has been shutdown. | 272 bool shutdown_ = false; // True after |this| has been shutdown. |
| 271 | 273 |
| 272 THREAD_CHECKER(thread_checker_); | 274 THREAD_CHECKER(thread_checker_); |
| 273 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 275 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
| 274 }; | 276 }; |
| 275 | 277 |
| 276 } // namespace media | 278 } // namespace media |
| 277 | 279 |
| 278 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 280 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| OLD | NEW |