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

Unified Diff: media/audio/win/audio_low_latency_output_win.cc

Issue 2720433002: Notify WASAPIAudioOutputStream users of rendering errors. (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_low_latency_output_win.cc
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc
index 33450a3f23ca17ce1c23cdac0fdbd5ca486ab236..3dbb7d6b0b559e8c9fc61ea602857818c6b0929c 100644
--- a/media/audio/win/audio_low_latency_output_win.cc
+++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -416,11 +416,16 @@ void WASAPIAudioOutputStream::Run() {
}
if (playing && error) {
+ LOG(ERROR) << "WASAPI rendering failed.";
+
// Stop audio rendering since something has gone wrong in our main thread
// loop. Note that, we are still in a "started" state, hence a Stop() call
// is required to join the thread properly.
audio_client_->Stop();
- PLOG(ERROR) << "WASAPI rendering failed.";
+
+ // Notify clients that something has gone wrong and that this stream should
+ // be destroyed instead of reused in the future.
+ source_->OnError(this);
}
// Disable MMCSS.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698