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

Unified Diff: media/audio/linux/alsa_output.cc

Issue 10413075: alsa_output: Drain and pause pcm when stopping. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: whitespace only. Created 8 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/linux/alsa_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_output.cc
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc
index ce301cef903713b1629b85012064fc3802969d83..d8653a8475cf2ebb0e2a6f82e0b73f4154818039 100644
--- a/media/audio/linux/alsa_output.cc
+++ b/media/audio/linux/alsa_output.cc
@@ -335,6 +335,9 @@ void AlsaPcmOutputStream::Stop() {
// Reset the callback, so that it is not called anymore.
set_source_callback(NULL);
+ // Finish playing samples and pause the pcm.
+ wrapper_->PcmDrain(playback_handle_);
+
TransitionTo(kIsStopped);
}
« no previous file with comments | « no previous file | media/audio/linux/alsa_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698