Chromium Code Reviews| Index: media/audio/audio_output_controller.cc |
| diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc |
| index f21da8fb75f429574aa11819d068c06b2a40adc2..a0bb92f01606861b5c91f46b7455747d7613d13c 100644 |
| --- a/media/audio/audio_output_controller.cc |
| +++ b/media/audio/audio_output_controller.cc |
| @@ -319,17 +319,8 @@ int AudioOutputController::OnMoreIOData(AudioBus* source, |
| } |
| void AudioOutputController::WaitTillDataReady() { |
| - if (!sync_reader_->DataReady()) { |
| - // In the different place we use different mechanism to poll, get max |
| - // polling delay from constants used there. |
| - const base::TimeDelta kMaxPollingDelay = TimeDelta::FromMilliseconds( |
| - kPollNumAttempts * kPollPauseInMilliseconds); |
| - Time start_time = Time::Now(); |
| - do { |
| - base::PlatformThread::Sleep(TimeDelta::FromMilliseconds(1)); |
| - } while (!sync_reader_->DataReady() && |
| - Time::Now() - start_time < kMaxPollingDelay); |
| - } |
| + while (!sync_reader_->DataReady()) |
|
scherkus (not reviewing)
2012/11/21 21:37:57
how about backing up your comments w/ something li
DaleCurtis
2012/11/21 22:42:10
We'll need OS_MAC in there too for now since the h
|
| + base::PlatformThread::YieldCurrentThread(); |
|
Chris Rogers
2012/11/21 19:33:37
We should probably check that this while is not sp
scherkus (not reviewing)
2012/11/21 21:37:57
perhaps a CHECK()-timeout and monitor for any repo
DaleCurtis
2012/11/21 22:42:10
CHECK() worries me, I've added a 1.5 second timeou
|
| } |
| void AudioOutputController::OnError(AudioOutputStream* stream, int code) { |