Chromium Code Reviews| 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) |
|
henrika (OOO until Aug 14)
2013/06/03 07:57:18
Great that you was able to get rid of this one.
|
| - 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)); |