| 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 // 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 function for clients wishing to have unified input and | 84 // Initialize function for clients wishing to have unified input and |
| 85 // output, |params| may specify |input_channels| > 0, representing a | 85 // output, |params| may specify |input_channels| > 0, representing a |
| 86 // number of input channels which will be at the same sample-rate | 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 | 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. | 88 // used for the browser to select the correct input device. |
| 89 // In this case, the callback's RenderIO() method will be called instead | 89 void InitializeWithSessionId(const AudioParameters& params, |
| 90 // of Render(), providing the synchronized input data at the same time as | |
| 91 // when new output data is to be rendered. | |
| 92 void InitializeUnifiedStream(const AudioParameters& params, | |
| 93 RenderCallback* callback, | 90 RenderCallback* callback, |
| 94 int session_id); | 91 int session_id); |
| 95 | 92 |
| 96 // AudioRendererSink implementation. | 93 // AudioRendererSink implementation. |
| 97 virtual void Initialize(const AudioParameters& params, | 94 virtual void Initialize(const AudioParameters& params, |
| 98 RenderCallback* callback) OVERRIDE; | 95 RenderCallback* callback) OVERRIDE; |
| 99 virtual void Start() OVERRIDE; | 96 virtual void Start() OVERRIDE; |
| 100 virtual void Stop() OVERRIDE; | 97 virtual void Stop() OVERRIDE; |
| 101 virtual void Play() OVERRIDE; | 98 virtual void Play() OVERRIDE; |
| 102 virtual void Pause() OVERRIDE; | 99 virtual void Pause() OVERRIDE; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept | 173 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept |
| 177 // the callback via Start(). See http://crbug.com/151051 for details. | 174 // the callback via Start(). See http://crbug.com/151051 for details. |
| 178 bool stopping_hack_; | 175 bool stopping_hack_; |
| 179 | 176 |
| 180 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); | 177 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); |
| 181 }; | 178 }; |
| 182 | 179 |
| 183 } // namespace media | 180 } // namespace media |
| 184 | 181 |
| 185 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ | 182 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ |
| OLD | NEW |