| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 const std::string& input_device_id) = 0; | 244 const std::string& input_device_id) = 0; |
| 245 | 245 |
| 246 // Create a new AudioLog object for tracking the behavior for one or more | 246 // Create a new AudioLog object for tracking the behavior for one or more |
| 247 // instances of the given component. See AudioLogFactory for more details. | 247 // instances of the given component. See AudioLogFactory for more details. |
| 248 virtual std::unique_ptr<AudioLog> CreateAudioLog( | 248 virtual std::unique_ptr<AudioLog> CreateAudioLog( |
| 249 AudioLogFactory::AudioComponent component) = 0; | 249 AudioLogFactory::AudioComponent component) = 0; |
| 250 | 250 |
| 251 // Gets the name of the audio manager (e.g., Windows, Mac, PulseAudio). | 251 // Gets the name of the audio manager (e.g., Windows, Mac, PulseAudio). |
| 252 virtual const char* GetName() = 0; | 252 virtual const char* GetName() = 0; |
| 253 | 253 |
| 254 // Limits the number of streams that can be created for testing purposes. |
| 255 virtual void SetMaxStreamCountForTesting(int max_input, int max_output); |
| 256 |
| 254 protected: | 257 protected: |
| 255 AudioManager(scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 258 AudioManager(scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 256 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner); | 259 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner); |
| 257 virtual ~AudioManager(); | 260 virtual ~AudioManager(); |
| 258 | 261 |
| 259 private: | 262 private: |
| 260 friend class base::DeleteHelper<AudioManager>; | 263 friend class base::DeleteHelper<AudioManager>; |
| 261 | 264 |
| 262 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 265 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 263 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; | 266 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; |
| 264 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 267 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
| 265 }; | 268 }; |
| 266 | 269 |
| 267 } // namespace media | 270 } // namespace media |
| 268 | 271 |
| 269 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 272 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| OLD | NEW |