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

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

Issue 2722053002: Merge M57: "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 48332885e75e412a0d27f2cdc8e45eb3a006c2fd..589e312b094cf67eb5553532117fa256eea8fb48 100644
--- a/media/audio/win/audio_low_latency_output_win.cc
+++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -436,11 +436,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