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

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

Issue 11880009: Introduce AudioHardwareConfig for renderer side audio device info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style nits. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
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_OUTPUT_CONTROLLER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
7 7
8 #include "base/atomic_ref_count.h" 8 #include "base/atomic_ref_count.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 NON_EXPORTED_BASE(public AudioManager::AudioDeviceListener) { 64 NON_EXPORTED_BASE(public AudioManager::AudioDeviceListener) {
65 public: 65 public:
66 // An event handler that receives events from the AudioOutputController. The 66 // An event handler that receives events from the AudioOutputController. The
67 // following methods are called on the audio manager thread. 67 // following methods are called on the audio manager thread.
68 class MEDIA_EXPORT EventHandler { 68 class MEDIA_EXPORT EventHandler {
69 public: 69 public:
70 virtual void OnCreated(AudioOutputController* controller) = 0; 70 virtual void OnCreated(AudioOutputController* controller) = 0;
71 virtual void OnPlaying(AudioOutputController* controller) = 0; 71 virtual void OnPlaying(AudioOutputController* controller) = 0;
72 virtual void OnPaused(AudioOutputController* controller) = 0; 72 virtual void OnPaused(AudioOutputController* controller) = 0;
73 virtual void OnError(AudioOutputController* controller, int error_code) = 0; 73 virtual void OnError(AudioOutputController* controller, int error_code) = 0;
74 virtual void OnDeviceChange(AudioOutputController* controller,
75 int new_buffer_size, int new_sample_rate) = 0;
74 76
75 protected: 77 protected:
76 virtual ~EventHandler() {} 78 virtual ~EventHandler() {}
77 }; 79 };
78 80
79 // A synchronous reader interface used by AudioOutputController for 81 // A synchronous reader interface used by AudioOutputController for
80 // synchronous reading. 82 // synchronous reading.
81 // TODO(crogers): find a better name for this class and the Read() method 83 // TODO(crogers): find a better name for this class and the Read() method
82 // now that it can handle synchronized I/O. 84 // now that it can handle synchronized I/O.
83 class SyncReader { 85 class SyncReader {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // Used to auto-cancel the delayed tasks that are created to poll for data 242 // Used to auto-cancel the delayed tasks that are created to poll for data
241 // (when starting-up a stream). 243 // (when starting-up a stream).
242 base::WeakPtrFactory<AudioOutputController> weak_this_; 244 base::WeakPtrFactory<AudioOutputController> weak_this_;
243 245
244 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); 246 DISALLOW_COPY_AND_ASSIGN(AudioOutputController);
245 }; 247 };
246 248
247 } // namespace media 249 } // namespace media
248 250
249 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ 251 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698