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_BASE_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 virtual AudioInputStream* MakeLowLatencyInputStream( | 87 virtual AudioInputStream* MakeLowLatencyInputStream( |
88 const AudioParameters& params, const std::string& device_id) = 0; | 88 const AudioParameters& params, const std::string& device_id) = 0; |
89 | 89 |
90 // Listeners will be notified on the AudioManager::GetMessageLoop() loop. | 90 // Listeners will be notified on the AudioManager::GetMessageLoop() loop. |
91 virtual void AddOutputDeviceChangeListener( | 91 virtual void AddOutputDeviceChangeListener( |
92 AudioDeviceListener* listener) OVERRIDE; | 92 AudioDeviceListener* listener) OVERRIDE; |
93 virtual void RemoveOutputDeviceChangeListener( | 93 virtual void RemoveOutputDeviceChangeListener( |
94 AudioDeviceListener* listener) OVERRIDE; | 94 AudioDeviceListener* listener) OVERRIDE; |
95 | 95 |
96 virtual AudioParameters GetDefaultOutputStreamParameters() OVERRIDE; | 96 virtual AudioParameters GetDefaultOutputStreamParameters() OVERRIDE; |
| 97 virtual AudioParameters GetOutputStreamParameters( |
| 98 const std::string& device_id) OVERRIDE; |
| 99 |
97 virtual AudioParameters GetInputStreamParameters( | 100 virtual AudioParameters GetInputStreamParameters( |
98 const std::string& device_id) OVERRIDE; | 101 const std::string& device_id) OVERRIDE; |
99 | 102 |
| 103 virtual std::string GetAssociatedOutputDeviceID( |
| 104 const std::string& input_device_id) OVERRIDE; |
| 105 |
100 protected: | 106 protected: |
101 AudioManagerBase(); | 107 AudioManagerBase(); |
102 | 108 |
103 | 109 |
104 // Shuts down the audio thread and releases all the audio output dispatchers | 110 // Shuts down the audio thread and releases all the audio output dispatchers |
105 // on the audio thread. All audio streams should be freed before Shutdown() | 111 // on the audio thread. All audio streams should be freed before Shutdown() |
106 // is called. This must be called in the destructor of every AudioManagerBase | 112 // is called. This must be called in the destructor of every AudioManagerBase |
107 // implementation. | 113 // implementation. |
108 void Shutdown(); | 114 void Shutdown(); |
109 | 115 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // Map of cached AudioOutputDispatcher instances. Must only be touched | 176 // Map of cached AudioOutputDispatcher instances. Must only be touched |
171 // from the audio thread (no locking). | 177 // from the audio thread (no locking). |
172 AudioOutputDispatchers output_dispatchers_; | 178 AudioOutputDispatchers output_dispatchers_; |
173 | 179 |
174 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 180 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
175 }; | 181 }; |
176 | 182 |
177 } // namespace media | 183 } // namespace media |
178 | 184 |
179 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 185 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
OLD | NEW |