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

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

Issue 509893002: Revert of Remove the last piece of deprecated synchronous IO code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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
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 // Audio rendering unit utilizing audio output stream provided by browser 5 // Audio rendering unit utilizing audio output stream provided by browser
6 // process through IPC. 6 // process through IPC.
7 // 7 //
8 // Relationship of classes. 8 // Relationship of classes.
9 // 9 //
10 // AudioOutputController AudioOutputDevice 10 // AudioOutputController AudioOutputDevice
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 class MEDIA_EXPORT AudioOutputDevice 74 class MEDIA_EXPORT AudioOutputDevice
75 : NON_EXPORTED_BASE(public AudioRendererSink), 75 : NON_EXPORTED_BASE(public AudioRendererSink),
76 NON_EXPORTED_BASE(public AudioOutputIPCDelegate), 76 NON_EXPORTED_BASE(public AudioOutputIPCDelegate),
77 NON_EXPORTED_BASE(public ScopedTaskRunnerObserver) { 77 NON_EXPORTED_BASE(public ScopedTaskRunnerObserver) {
78 public: 78 public:
79 // NOTE: Clients must call Initialize() before using. 79 // NOTE: Clients must call Initialize() before using.
80 AudioOutputDevice( 80 AudioOutputDevice(
81 scoped_ptr<AudioOutputIPC> ipc, 81 scoped_ptr<AudioOutputIPC> ipc,
82 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); 82 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
83 83
84 // Initialize the stream using |session_id|, which is used for the browser 84 // Initialize function for clients wishing to have unified input and
85 // to select the correct input device. 85 // output, |params| may specify |input_channels| > 0, representing a
86 // number of input channels which will be at the same sample-rate
87 // and buffer-size as the output as specified in |params|. |session_id| is
88 // used for the browser to select the correct input device.
86 void InitializeWithSessionId(const AudioParameters& params, 89 void InitializeWithSessionId(const AudioParameters& params,
87 RenderCallback* callback, 90 RenderCallback* callback,
88 int session_id); 91 int session_id);
89 92
90 // AudioRendererSink implementation. 93 // AudioRendererSink implementation.
91 virtual void Initialize(const AudioParameters& params, 94 virtual void Initialize(const AudioParameters& params,
92 RenderCallback* callback) OVERRIDE; 95 RenderCallback* callback) OVERRIDE;
93 virtual void Start() OVERRIDE; 96 virtual void Start() OVERRIDE;
94 virtual void Stop() OVERRIDE; 97 virtual void Stop() OVERRIDE;
95 virtual void Play() OVERRIDE; 98 virtual void Play() OVERRIDE;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept 173 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept
171 // the callback via Start(). See http://crbug.com/151051 for details. 174 // the callback via Start(). See http://crbug.com/151051 for details.
172 bool stopping_hack_; 175 bool stopping_hack_;
173 176
174 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); 177 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice);
175 }; 178 };
176 179
177 } // namespace media 180 } // namespace media
178 181
179 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ 182 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_
OLDNEW
« no previous file with comments | « media/audio/android/audio_manager_android.cc ('k') | media/audio/audio_output_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698