| 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 AudioDevice | 10 // AudioOutputController AudioDevice |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 AudioDevice(); | 91 AudioDevice(); |
| 92 | 92 |
| 93 // AudioRendererSink implementation. | 93 // AudioRendererSink implementation. |
| 94 virtual void Initialize(const media::AudioParameters& params, | 94 virtual void Initialize(const media::AudioParameters& params, |
| 95 RenderCallback* callback) OVERRIDE; | 95 RenderCallback* callback) OVERRIDE; |
| 96 virtual void Start() OVERRIDE; | 96 virtual void Start() OVERRIDE; |
| 97 virtual void Stop() OVERRIDE; | 97 virtual void Stop() OVERRIDE; |
| 98 virtual void Play() OVERRIDE; | 98 virtual void Play() OVERRIDE; |
| 99 virtual void Pause(bool flush) OVERRIDE; | 99 virtual void Pause(bool flush) OVERRIDE; |
| 100 virtual bool SetVolume(double volume) OVERRIDE; | 100 virtual bool SetVolume(double volume) OVERRIDE; |
| 101 virtual void GetVolume(double* volume) OVERRIDE; | |
| 102 | 101 |
| 103 // Methods called on IO thread ---------------------------------------------- | 102 // Methods called on IO thread ---------------------------------------------- |
| 104 // AudioMessageFilter::Delegate methods, called by AudioMessageFilter. | 103 // AudioMessageFilter::Delegate methods, called by AudioMessageFilter. |
| 105 virtual void OnStateChanged(AudioStreamState state) OVERRIDE; | 104 virtual void OnStateChanged(AudioStreamState state) OVERRIDE; |
| 106 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 105 virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
| 107 base::SyncSocket::Handle socket_handle, | 106 base::SyncSocket::Handle socket_handle, |
| 108 uint32 length) OVERRIDE; | 107 uint32 length) OVERRIDE; |
| 109 | 108 |
| 110 private: | 109 private: |
| 111 // Magic required by ref_counted.h to avoid any code deleting the object | 110 // Magic required by ref_counted.h to avoid any code deleting the object |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // guard to control stopping and starting the audio thread. | 158 // guard to control stopping and starting the audio thread. |
| 160 base::Lock audio_thread_lock_; | 159 base::Lock audio_thread_lock_; |
| 161 AudioDeviceThread audio_thread_; | 160 AudioDeviceThread audio_thread_; |
| 162 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_; | 161 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_; |
| 163 | 162 |
| 164 | 163 |
| 165 DISALLOW_COPY_AND_ASSIGN(AudioDevice); | 164 DISALLOW_COPY_AND_ASSIGN(AudioDevice); |
| 166 }; | 165 }; |
| 167 | 166 |
| 168 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ | 167 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ |
| OLD | NEW |