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

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

Issue 16103007: Privitize WaitTillDataReady() and DataReady(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gotta catch'em all! Created 7 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 | « media/audio/virtual_audio_output_stream.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 9b03c31cbd7cd93d7c6d6b6d5c344af5f44fb4cd..47d4fa65053a157a3466680b50ef4b81ca8991a5 100644
--- a/media/audio/win/waveout_output_win.cc
+++ b/media/audio/win/waveout_output_win.cc
@@ -204,10 +204,6 @@ void PCMWaveOutAudioOutputStream::Start(AudioSourceCallback* callback) {
pending_bytes_ = 0;
for (int ix = 0; ix != num_buffers_; ++ix) {
WAVEHDR* buffer = GetBuffer(ix);
- // Caller waits for 1st packet to become available, but not for others,
- // so we wait for them here.
- if (ix != 0)
- callback_->WaitTillDataReady();
QueueNextPacket(buffer); // Read more data.
pending_bytes_ += buffer->dwBufferLength;
}
@@ -343,13 +339,6 @@ void PCMWaveOutAudioOutputStream::QueueNextPacket(WAVEHDR *buffer) {
// return to us how many bytes were used.
// TODO(fbarchard): Handle used 0 by queueing more.
- // HACK: Yield if Read() is called too often. On older platforms which are
- // still using the WaveOut backend, we run into synchronization issues where
- // the renderer has not finished filling the shared memory when Read() is
- // called. Reading too early will lead to clicks and pops. See issues:
- // http://crbug.com/161307 and http://crbug.com/61022
- callback_->WaitTillDataReady();
-
// TODO(sergeyu): Specify correct hardware delay for AudioBuffersState.
int frames_filled = callback_->OnMoreData(
audio_bus_.get(), AudioBuffersState(pending_bytes_, 0));
« no previous file with comments | « media/audio/virtual_audio_output_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698