| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 function for clients wishing to have unified input and | 84 // Initialize the stream using |session_id|, which is used for the browser |
| 85 // output, |params| may specify |input_channels| > 0, representing a | 85 // to select the correct input device. |
| 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. | |
| 89 void InitializeWithSessionId(const AudioParameters& params, | 86 void InitializeWithSessionId(const AudioParameters& params, |
| 90 RenderCallback* callback, | 87 RenderCallback* callback, |
| 91 int session_id); | 88 int session_id); |
| 92 | 89 |
| 93 // AudioRendererSink implementation. | 90 // AudioRendererSink implementation. |
| 94 virtual void Initialize(const AudioParameters& params, | 91 virtual void Initialize(const AudioParameters& params, |
| 95 RenderCallback* callback) OVERRIDE; | 92 RenderCallback* callback) OVERRIDE; |
| 96 virtual void Start() OVERRIDE; | 93 virtual void Start() OVERRIDE; |
| 97 virtual void Stop() OVERRIDE; | 94 virtual void Stop() OVERRIDE; |
| 98 virtual void Play() OVERRIDE; | 95 virtual void Play() OVERRIDE; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept | 170 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept |
| 174 // the callback via Start(). See http://crbug.com/151051 for details. | 171 // the callback via Start(). See http://crbug.com/151051 for details. |
| 175 bool stopping_hack_; | 172 bool stopping_hack_; |
| 176 | 173 |
| 177 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); | 174 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); |
| 178 }; | 175 }; |
| 179 | 176 |
| 180 } // namespace media | 177 } // namespace media |
| 181 | 178 |
| 182 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ | 179 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ |
| OLD | NEW |