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

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

Issue 193095: Pause for <video> should have immediate effect on audio (Closed)
Patch Set: style Created 11 years, 3 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 | « chrome/browser/renderer_host/audio_renderer_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/waveout_output_win.cc
diff --git a/media/audio/win/waveout_output_win.cc b/media/audio/win/waveout_output_win.cc
index 21532b76b7bf908e40a5a929e9ee9b4d31e69dfb..241152744489561a213391b9a9c52ab59da3d201 100644
--- a/media/audio/win/waveout_output_win.cc
+++ b/media/audio/win/waveout_output_win.cc
@@ -142,6 +142,7 @@ void PCMWaveOutAudioOutputStream::Start(AudioSourceCallback* callback) {
return;
callback_ = callback;
state_ = PCMA_PLAYING;
+ pending_bytes_ = 0;
WAVEHDR* buffer = buffer_;
for (int ix = 0; ix != kNumBuffers; ++ix) {
QueueNextPacket(buffer); // Read more data.
@@ -172,8 +173,8 @@ void PCMWaveOutAudioOutputStream::Start(AudioSourceCallback* callback) {
}
// Stopping is tricky. First, no buffer should be locked by the audio driver
-// or else the waveOutReset will deadlock and secondly, the callback should not
-// be inside the AudioSource's OnMoreData because waveOutReset() forcefully
+// or else the waveOutReset() will deadlock and secondly, the callback should
+// not be inside the AudioSource's OnMoreData because waveOutReset() forcefully
// kills the callback thread.
void PCMWaveOutAudioOutputStream::Stop() {
if (state_ != PCMA_PLAYING)
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698