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 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 // Specifies the device id of the output device to open or empty for the | 228 // Specifies the device id of the output device to open or empty for the |
229 // default output device. | 229 // default output device. |
230 std::string output_device_id_; | 230 std::string output_device_id_; |
231 | 231 |
232 AudioOutputStream* stream_; | 232 AudioOutputStream* stream_; |
233 | 233 |
234 // When non-NULL, audio is being diverted to this stream. | 234 // When non-NULL, audio is being diverted to this stream. |
235 AudioOutputStream* diverting_to_stream_; | 235 AudioOutputStream* diverting_to_stream_; |
236 | 236 |
237 // The targets for audio stream to be copied to. | 237 // The targets for audio stream to be copied to. |should_duplicate_| is set to |
| 238 // 1 when the OnMoreData() call should proxy the data to |
| 239 // BroadcastDataToDuplicationTargets(). |
238 std::set<AudioPushSink*> duplication_targets_; | 240 std::set<AudioPushSink*> duplication_targets_; |
239 base::Lock duplication_targets_lock_; | 241 base::AtomicRefCount should_duplicate_; |
240 | 242 |
241 // The current volume of the audio stream. | 243 // The current volume of the audio stream. |
242 double volume_; | 244 double volume_; |
243 | 245 |
244 // |state_| may only be used on the audio manager thread. | 246 // |state_| may only be used on the audio manager thread. |
245 State state_; | 247 State state_; |
246 | 248 |
247 // SyncReader is used only in low latency mode for synchronous reading. | 249 // SyncReader is used only in low latency mode for synchronous reading. |
248 SyncReader* const sync_reader_; | 250 SyncReader* const sync_reader_; |
249 | 251 |
(...skipping 16 matching lines...) Expand all Loading... |
266 // be accessed while |error_lock_| is held. | 268 // be accessed while |error_lock_| is held. |
267 bool ignore_errors_during_stop_close_; | 269 bool ignore_errors_during_stop_close_; |
268 base::Lock error_lock_; | 270 base::Lock error_lock_; |
269 | 271 |
270 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); | 272 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); |
271 }; | 273 }; |
272 | 274 |
273 } // namespace media | 275 } // namespace media |
274 | 276 |
275 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 277 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
OLD | NEW |