OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Low-latency audio rendering unit utilizing audio output stream provided | 5 // Low-latency audio rendering unit utilizing audio output stream provided |
6 // by browser process through IPC. | 6 // by browser process through IPC. |
7 // | 7 // |
8 // Relationship of classes. | 8 // Relationship of classes. |
9 // | 9 // |
10 // AudioOutputController AudioDevice | 10 // AudioOutputController AudioDevice |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 base::SharedMemory* shared_memory() { return shared_memory_.get(); } | 158 base::SharedMemory* shared_memory() { return shared_memory_.get(); } |
159 base::SyncSocket* socket() { return socket_.get(); } | 159 base::SyncSocket* socket() { return socket_.get(); } |
160 void* shared_memory_data() { return shared_memory()->memory(); } | 160 void* shared_memory_data() { return shared_memory()->memory(); } |
161 | 161 |
162 // Cached audio message filter (lives on the main render thread). | 162 // Cached audio message filter (lives on the main render thread). |
163 scoped_refptr<AudioMessageFilter> filter_; | 163 scoped_refptr<AudioMessageFilter> filter_; |
164 | 164 |
165 // Our stream ID on the message filter. Only accessed on the IO thread. | 165 // Our stream ID on the message filter. Only accessed on the IO thread. |
166 int32 stream_id_; | 166 int32 stream_id_; |
167 | 167 |
168 // WaitableEvent for signaling the audio thread that it should stop. | |
169 base::WaitableEvent audio_event_; | |
enal1
2011/11/29 16:14:48
Maybe include "stop" in the name? Something like "
tommi (sloooow) - chröme
2011/11/29 16:41:53
audio_event_ -> stop_event_
or stop_audio_event_
| |
170 | |
168 // Data transfer between browser and render process uses a combination | 171 // Data transfer between browser and render process uses a combination |
169 // of sync sockets and shared memory to provide lowest possible latency. | 172 // of sync sockets and shared memory to provide lowest possible latency. |
170 scoped_ptr<base::SharedMemory> shared_memory_; | 173 scoped_ptr<base::SharedMemory> shared_memory_; |
171 scoped_ptr<base::SyncSocket> socket_; | 174 scoped_ptr<base::SyncSocket> socket_; |
172 | 175 |
173 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDevice); | 176 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDevice); |
174 }; | 177 }; |
175 | 178 |
176 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ | 179 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ |
OLD | NEW |