Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: media/audio/audio_manager.h

Issue 1780333007: AudioManagerBase: Create and run the audio thread lazily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/audio/audio_manager_base.h » ('j') | media/audio/mac/audio_manager_mac.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/macros.h" 10 #include "base/macros.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Returns NULL if the combination of the parameters is not supported, or if 171 // Returns NULL if the combination of the parameters is not supported, or if
172 // we have reached some other platform specific limit. 172 // we have reached some other platform specific limit.
173 // 173 //
174 // Do not free the returned AudioInputStream. It is owned by AudioManager. 174 // Do not free the returned AudioInputStream. It is owned by AudioManager.
175 // When you are done with it, call |Stop()| and |Close()| to release it. 175 // When you are done with it, call |Stop()| and |Close()| to release it.
176 virtual AudioInputStream* MakeAudioInputStream( 176 virtual AudioInputStream* MakeAudioInputStream(
177 const AudioParameters& params, 177 const AudioParameters& params,
178 const std::string& device_id) = 0; 178 const std::string& device_id) = 0;
179 179
180 // Returns the task runner used for audio IO. 180 // Returns the task runner used for audio IO.
181 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() const = 0; 181 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0;
182 182
183 // Heavyweight tasks should use GetWorkerTaskRunner() instead of 183 // Heavyweight tasks should use GetWorkerTaskRunner() instead of
184 // GetTaskRunner(). On most platforms they are the same, but some share the 184 // GetTaskRunner(). On most platforms they are the same, but some share the
185 // UI loop with the audio IO loop. 185 // UI loop with the audio IO loop.
186 virtual scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() = 0; 186 virtual scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() = 0;
187 187
188 // Allows clients to listen for device state changes; e.g. preferred sample 188 // Allows clients to listen for device state changes; e.g. preferred sample
189 // rate or channel layout changes. The typical response to receiving this 189 // rate or channel layout changes. The typical response to receiving this
190 // callback is to recreate the stream. 190 // callback is to recreate the stream.
191 class AudioDeviceListener { 191 class AudioDeviceListener {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 protected: 232 protected:
233 AudioManager(); 233 AudioManager();
234 234
235 private: 235 private:
236 DISALLOW_COPY_AND_ASSIGN(AudioManager); 236 DISALLOW_COPY_AND_ASSIGN(AudioManager);
237 }; 237 };
238 238
239 } // namespace media 239 } // namespace media
240 240
241 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 241 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_manager_base.h » ('j') | media/audio/mac/audio_manager_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698