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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Should only be used for testing. Resets a previously-set | 73 // Should only be used for testing. Resets a previously-set |
74 // AudioManagerFactory. The instance of AudioManager is not affected. | 74 // AudioManagerFactory. The instance of AudioManager is not affected. |
75 static void ResetFactoryForTesting(); | 75 static void ResetFactoryForTesting(); |
76 | 76 |
77 // Returns the pointer to the last created instance, or NULL if not yet | 77 // Returns the pointer to the last created instance, or NULL if not yet |
78 // created. This is a utility method for the code outside of media directory, | 78 // created. This is a utility method for the code outside of media directory, |
79 // like src/chrome. | 79 // like src/chrome. |
80 static AudioManager* Get(); | 80 static AudioManager* Get(); |
81 | 81 |
| 82 // Returns the localized name of the generic "default" device. |
| 83 static std::string GetDefaultDeviceName(); |
| 84 |
| 85 // Returns the localized name of the generic default communications device. |
| 86 // This device is not supported on all platforms. |
| 87 static std::string GetCommunicationsDeviceName(); |
| 88 |
82 // Returns true if the OS reports existence of audio devices. This does not | 89 // Returns true if the OS reports existence of audio devices. This does not |
83 // guarantee that the existing devices support all formats and sample rates. | 90 // guarantee that the existing devices support all formats and sample rates. |
84 virtual bool HasAudioOutputDevices() = 0; | 91 virtual bool HasAudioOutputDevices() = 0; |
85 | 92 |
86 // Returns true if the OS reports existence of audio recording devices. This | 93 // Returns true if the OS reports existence of audio recording devices. This |
87 // does not guarantee that the existing devices support all formats and | 94 // does not guarantee that the existing devices support all formats and |
88 // sample rates. | 95 // sample rates. |
89 virtual bool HasAudioInputDevices() = 0; | 96 virtual bool HasAudioInputDevices() = 0; |
90 | 97 |
91 // Returns a human readable string for the model/make of the active audio | 98 // Returns a human readable string for the model/make of the active audio |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 protected: | 230 protected: |
224 AudioManager(); | 231 AudioManager(); |
225 | 232 |
226 private: | 233 private: |
227 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 234 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
228 }; | 235 }; |
229 | 236 |
230 } // namespace media | 237 } // namespace media |
231 | 238 |
232 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 239 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
OLD | NEW |