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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // objects. Provides some convenience functions that avoid the need to provide | 24 // objects. Provides some convenience functions that avoid the need to provide |
25 // iterators over the existing streams. | 25 // iterators over the existing streams. |
26 class MEDIA_EXPORT AudioManager { | 26 class MEDIA_EXPORT AudioManager { |
27 public: | 27 public: |
28 virtual ~AudioManager(); | 28 virtual ~AudioManager(); |
29 | 29 |
30 // Use to construct the audio manager. | 30 // Use to construct the audio manager. |
31 // NOTE: There should only be one instance. | 31 // NOTE: There should only be one instance. |
32 static AudioManager* Create(); | 32 static AudioManager* Create(); |
33 | 33 |
| 34 // Returns the AudioManager object if it's been created, NULL otherwise. |
| 35 static AudioManager* Get(); |
| 36 |
34 // Returns true if the OS reports existence of audio devices. This does not | 37 // Returns true if the OS reports existence of audio devices. This does not |
35 // guarantee that the existing devices support all formats and sample rates. | 38 // guarantee that the existing devices support all formats and sample rates. |
36 virtual bool HasAudioOutputDevices() = 0; | 39 virtual bool HasAudioOutputDevices() = 0; |
37 | 40 |
38 // Returns true if the OS reports existence of audio recording devices. This | 41 // Returns true if the OS reports existence of audio recording devices. This |
39 // does not guarantee that the existing devices support all formats and | 42 // does not guarantee that the existing devices support all formats and |
40 // sample rates. | 43 // sample rates. |
41 virtual bool HasAudioInputDevices() = 0; | 44 virtual bool HasAudioInputDevices() = 0; |
42 | 45 |
43 // Returns a human readable string for the model/make of the active audio | 46 // Returns a human readable string for the model/make of the active audio |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 AudioManager(); | 121 AudioManager(); |
119 | 122 |
120 // Called from Create() to initialize the instance. | 123 // Called from Create() to initialize the instance. |
121 virtual void Init() = 0; | 124 virtual void Init() = 0; |
122 | 125 |
123 private: | 126 private: |
124 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 127 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
125 }; | 128 }; |
126 | 129 |
127 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 130 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
OLD | NEW |