| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // Returns the app name or an empty string if it is not set. | 91 // Returns the app name or an empty string if it is not set. |
| 92 static const std::string& GetGlobalAppName(); | 92 static const std::string& GetGlobalAppName(); |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 // Returns the pointer to the last created instance, or NULL if not yet | 95 // Returns the pointer to the last created instance, or NULL if not yet |
| 96 // created. This is a utility method for the code outside of media directory, | 96 // created. This is a utility method for the code outside of media directory, |
| 97 // like src/chrome. | 97 // like src/chrome. |
| 98 static AudioManager* Get(); | 98 static AudioManager* Get(); |
| 99 | 99 |
| 100 // Returns the localized name of the generic "default" device. | |
| 101 static std::string GetDefaultDeviceName(); | |
| 102 | |
| 103 // Returns the localized name of the generic default communications device. | |
| 104 // This device is not supported on all platforms. | |
| 105 static std::string GetCommunicationsDeviceName(); | |
| 106 | |
| 107 // Returns true if the OS reports existence of audio devices. This does not | 100 // Returns true if the OS reports existence of audio devices. This does not |
| 108 // guarantee that the existing devices support all formats and sample rates. | 101 // guarantee that the existing devices support all formats and sample rates. |
| 109 virtual bool HasAudioOutputDevices() = 0; | 102 virtual bool HasAudioOutputDevices() = 0; |
| 110 | 103 |
| 111 // Returns true if the OS reports existence of audio recording devices. This | 104 // Returns true if the OS reports existence of audio recording devices. This |
| 112 // does not guarantee that the existing devices support all formats and | 105 // does not guarantee that the existing devices support all formats and |
| 113 // sample rates. | 106 // sample rates. |
| 114 virtual bool HasAudioInputDevices() = 0; | 107 virtual bool HasAudioInputDevices() = 0; |
| 115 | 108 |
| 116 // Returns a human readable string for the model/make of the active audio | 109 // Returns a human readable string for the model/make of the active audio |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 friend class base::DeleteHelper<AudioManager>; | 248 friend class base::DeleteHelper<AudioManager>; |
| 256 | 249 |
| 257 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 250 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 258 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; | 251 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; |
| 259 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 252 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
| 260 }; | 253 }; |
| 261 | 254 |
| 262 } // namespace media | 255 } // namespace media |
| 263 | 256 |
| 264 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 257 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| OLD | NEW |