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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // callback is to recreate the stream. | 113 // callback is to recreate the stream. |
114 class AudioDeviceListener { | 114 class AudioDeviceListener { |
115 public: | 115 public: |
116 virtual void OnDeviceChange() = 0; | 116 virtual void OnDeviceChange() = 0; |
117 }; | 117 }; |
118 | 118 |
119 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; | 119 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; |
120 virtual void RemoveOutputDeviceChangeListener( | 120 virtual void RemoveOutputDeviceChangeListener( |
121 AudioDeviceListener* listener) = 0; | 121 AudioDeviceListener* listener) = 0; |
122 | 122 |
| 123 // Returns the default output hardware audio parameters for opening output |
| 124 // streams. It is a convenience interface to |
| 125 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager |
| 126 // does not need their own implementation to this interface. |
| 127 virtual AudioParameters GetDefaultOutputStreamParameters() = 0; |
| 128 |
| 129 // Returns the input hardware audio parameters of the specific device |
| 130 // for opening input streams. Each AudioManager needs to implement their own |
| 131 // version of this interface. |
| 132 virtual AudioParameters GetInputStreamParameters( |
| 133 const std::string& device_id) = 0; |
| 134 |
123 protected: | 135 protected: |
124 AudioManager(); | 136 AudioManager(); |
125 | 137 |
126 private: | 138 private: |
127 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 139 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
128 }; | 140 }; |
129 | 141 |
130 } // namespace media | 142 } // namespace media |
131 | 143 |
132 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 144 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
OLD | NEW |