| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| 11 #include "media/audio/audio_device_name.h" | 11 #include "media/audio/audio_device_name.h" |
| 12 #include "media/audio/audio_parameters.h" | 12 #include "media/audio/audio_parameters.h" |
| 13 | 13 |
| 14 class AudioInputStream; | 14 class AudioInputStream; |
| 15 class AudioOutputStream; | 15 class AudioOutputStream; |
| 16 class MessageLoop; | 16 class MessageLoop; |
| 17 | 17 |
| 18 // TODO(sergeyu): In this interface and some other places AudioParameters struct | 18 // TODO(sergeyu): In this interface and some other places AudioParameters struct |
| 19 // is passed by value. It is better to change it to const reference. | 19 // is passed by value. It is better to change it to const reference. |
| 20 | 20 |
| 21 // Manages all audio resources. In particular it owns the AudioOutputStream | 21 // Manages all audio resources. In particular it owns the AudioOutputStream |
| 22 // objects. Provides some convenience functions that avoid the need to provide | 22 // objects. Provides some convenience functions that avoid the need to provide |
| 23 // iterators over the existing streams. | 23 // iterators over the existing streams. |
| 24 class MEDIA_EXPORT AudioManager { | 24 class AudioManager { |
| 25 public: | 25 public: |
| 26 // Returns true if the OS reports existence of audio devices. This does not | 26 // Returns true if the OS reports existence of audio devices. This does not |
| 27 // guarantee that the existing devices support all formats and sample rates. | 27 // guarantee that the existing devices support all formats and sample rates. |
| 28 virtual bool HasAudioOutputDevices() = 0; | 28 virtual bool HasAudioOutputDevices() = 0; |
| 29 | 29 |
| 30 // Returns true if the OS reports existence of audio recording devices. This | 30 // Returns true if the OS reports existence of audio recording devices. This |
| 31 // does not guarantee that the existing devices support all formats and | 31 // does not guarantee that the existing devices support all formats and |
| 32 // sample rates. | 32 // sample rates. |
| 33 virtual bool HasAudioInputDevices() = 0; | 33 virtual bool HasAudioInputDevices() = 0; |
| 34 | 34 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 private: | 119 private: |
| 120 static void Destroy(void*); | 120 static void Destroy(void*); |
| 121 | 121 |
| 122 // Called by GetAudioManager() to create platform-specific audio manager. | 122 // Called by GetAudioManager() to create platform-specific audio manager. |
| 123 static AudioManager* CreateAudioManager(); | 123 static AudioManager* CreateAudioManager(); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 DISABLE_RUNNABLE_METHOD_REFCOUNT(AudioManager); | 126 DISABLE_RUNNABLE_METHOD_REFCOUNT(AudioManager); |
| 127 | 127 |
| 128 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 128 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| OLD | NEW |