Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: media/audio/audio_output_controller.h

Issue 2889613003: Remove unnecessary lock in AOC; use atomic ref count instead. (Closed)
Patch Set: Fix comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/audio/audio_output_controller.cc » ('j') | media/audio/audio_output_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_controller.h
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h
index fe7fa2b093caebfc401efa8eeb2fdc25dcb1d618..2c8bc52bba48dfed5f453c8102a8ca1c3b08550f 100644
--- a/media/audio/audio_output_controller.h
+++ b/media/audio/audio_output_controller.h
@@ -234,9 +234,11 @@ class MEDIA_EXPORT AudioOutputController
// When non-NULL, audio is being diverted to this stream.
AudioOutputStream* diverting_to_stream_;
- // The targets for audio stream to be copied to.
+ // The targets for audio stream to be copied to. |should_duplicate_| is set to
+ // 1 when the OnMoreData() call should proxy the data to
+ // BroadcastDataToDuplicationTargets().
std::set<AudioPushSink*> duplication_targets_;
- base::Lock duplication_targets_lock_;
+ base::AtomicRefCount should_duplicate_;
// The current volume of the audio stream.
double volume_;
« no previous file with comments | « no previous file | media/audio/audio_output_controller.cc » ('j') | media/audio/audio_output_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698