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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // implementation. | 114 // implementation. |
115 void Shutdown(); | 115 void Shutdown(); |
116 | 116 |
117 void SetMaxOutputStreamsAllowed(int max) { max_num_output_streams_ = max; } | 117 void SetMaxOutputStreamsAllowed(int max) { max_num_output_streams_ = max; } |
118 | 118 |
119 // Called by each platform specific AudioManager to notify output state change | 119 // Called by each platform specific AudioManager to notify output state change |
120 // listeners that a state change has occurred. Must be called from the audio | 120 // listeners that a state change has occurred. Must be called from the audio |
121 // thread. | 121 // thread. |
122 void NotifyAllOutputDeviceChangeListeners(); | 122 void NotifyAllOutputDeviceChangeListeners(); |
123 | 123 |
124 // Called on |audio_thread_|'s message loop immediately after construction. | 124 // AudioManager implementation. |
125 virtual void InitializeOnAudioThread(); | 125 virtual void InitializeOnAudioThread() OVERRIDE; |
126 | 126 |
127 // Map of cached AudioOutputDispatcher instances. Must only be touched | 127 // Map of cached AudioOutputDispatcher instances. Must only be touched |
128 // from the audio thread (no locking). | 128 // from the audio thread (no locking). |
129 AudioOutputDispatchersMap output_dispatchers_; | 129 AudioOutputDispatchersMap output_dispatchers_; |
130 | 130 |
131 private: | 131 private: |
132 // Called by Shutdown(). | 132 // Called by Shutdown(). |
133 void ShutdownOnAudioThread(); | 133 void ShutdownOnAudioThread(); |
134 | 134 |
135 // Counts the number of active input streams to find out if something else | 135 // Counts the number of active input streams to find out if something else |
(...skipping 24 matching lines...) Expand all Loading... |
160 // tasks which run on the audio thread even after Shutdown() has been started | 160 // tasks which run on the audio thread even after Shutdown() has been started |
161 // and GetMessageLoop() starts returning NULL. | 161 // and GetMessageLoop() starts returning NULL. |
162 scoped_refptr<base::MessageLoopProxy> message_loop_; | 162 scoped_refptr<base::MessageLoopProxy> message_loop_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 164 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
165 }; | 165 }; |
166 | 166 |
167 } // namespace media | 167 } // namespace media |
168 | 168 |
169 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 169 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
OLD | NEW |