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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 NON_EXPORTED_BASE(public ScopedLoopObserver) { | 86 NON_EXPORTED_BASE(public ScopedLoopObserver) { |
87 public: | 87 public: |
88 // Methods called on main render thread ------------------------------------- | 88 // Methods called on main render thread ------------------------------------- |
89 | 89 |
90 // Minimal constructor where Initialize() must be called later. | 90 // Minimal constructor where Initialize() must be called later. |
91 AudioDevice(); | 91 AudioDevice(); |
92 | 92 |
93 AudioDevice(const media::AudioParameters& params, RenderCallback* callback); | 93 AudioDevice(const media::AudioParameters& params, RenderCallback* callback); |
94 | 94 |
95 // AudioRendererSink implementation. | 95 // AudioRendererSink implementation. |
96 | |
97 virtual void Initialize(const media::AudioParameters& params, | 96 virtual void Initialize(const media::AudioParameters& params, |
98 RenderCallback* callback) OVERRIDE; | 97 RenderCallback* callback) OVERRIDE; |
99 virtual void Start() OVERRIDE; | 98 virtual void Start() OVERRIDE; |
100 virtual void Stop() OVERRIDE; | 99 virtual void Stop() OVERRIDE; |
101 virtual void Play() OVERRIDE; | 100 virtual void Play() OVERRIDE; |
102 virtual void Pause(bool flush) OVERRIDE; | 101 virtual void Pause(bool flush) OVERRIDE; |
103 virtual bool SetVolume(double volume) OVERRIDE; | 102 virtual bool SetVolume(double volume) OVERRIDE; |
104 virtual void GetVolume(double* volume) OVERRIDE; | 103 virtual void GetVolume(double* volume) OVERRIDE; |
105 | 104 |
106 // Methods called on IO thread ---------------------------------------------- | 105 // Methods called on IO thread ---------------------------------------------- |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // guard to control stopping and starting the audio thread. | 161 // guard to control stopping and starting the audio thread. |
163 base::Lock audio_thread_lock_; | 162 base::Lock audio_thread_lock_; |
164 AudioDeviceThread audio_thread_; | 163 AudioDeviceThread audio_thread_; |
165 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_; | 164 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_; |
166 | 165 |
167 | 166 |
168 DISALLOW_COPY_AND_ASSIGN(AudioDevice); | 167 DISALLOW_COPY_AND_ASSIGN(AudioDevice); |
169 }; | 168 }; |
170 | 169 |
171 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ | 170 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ |
OLD | NEW |