summaryrefslogtreecommitdiff
path: root/chromium/media/audio/audio_output_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/media/audio/audio_output_controller.h')
-rw-r--r--chromium/media/audio/audio_output_controller.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/chromium/media/audio/audio_output_controller.h b/chromium/media/audio/audio_output_controller.h
index f1711d5a607..7820665440b 100644
--- a/chromium/media/audio/audio_output_controller.h
+++ b/chromium/media/audio/audio_output_controller.h
@@ -232,9 +232,7 @@ class MEDIA_EXPORT AudioOutputController
// The current volume of the audio stream.
double volume_;
- // |state_| is written on the audio manager thread and is read on the
- // hardware audio thread. These operations need to be locked. But lock
- // is not required for reading on the audio manager thread.
+ // |state_| may only be used on the audio manager thread.
State state_;
// SyncReader is used only in low latency mode for synchronous reading.
@@ -250,6 +248,16 @@ class MEDIA_EXPORT AudioOutputController
base::AtomicRefCount on_more_io_data_called_;
scoped_ptr<base::OneShotTimer> wedge_timer_;
+ // Flag which indicates errors received during Stop/Close should be ignored.
+ // These errors are generally harmless since a fresh stream is about to be
+ // recreated, but if forwarded, renderer side clients may consider them
+ // catastrophic and abort their operations.
+ //
+ // If |stream_| is started then |ignore_errors_during_stop_close_| must only
+ // be accessed while |error_lock_| is held.
+ bool ignore_errors_during_stop_close_;
+ base::Lock error_lock_;
+
DISALLOW_COPY_AND_ASSIGN(AudioOutputController);
};