Index: content/browser/renderer_host/media/audio_sync_reader.h |
diff --git a/content/browser/renderer_host/media/audio_sync_reader.h b/content/browser/renderer_host/media/audio_sync_reader.h |
index fdfbf81a6013ff132a5d142b8356b9dcfd7fabb4..3842f49b6ee57d8fc56f1f2e6790fe9dbdae9d9b 100644 |
--- a/content/browser/renderer_host/media/audio_sync_reader.h |
+++ b/content/browser/renderer_host/media/audio_sync_reader.h |
@@ -33,6 +33,7 @@ class AudioSyncReader : public media::AudioOutputController::SyncReader { |
// media::AudioOutputController::SyncReader implementations. |
virtual void UpdatePendingBytes(uint32 bytes) OVERRIDE; |
+ // TODO(dalecurtis): Remove block. |
virtual int Read(bool block, |
const media::AudioBus* source, |
media::AudioBus* dest) OVERRIDE; |
@@ -50,8 +51,9 @@ class AudioSyncReader : public media::AudioOutputController::SyncReader { |
// Indicates whether the renderer has data available for reading. |
bool DataReady(); |
- // Blocks until DataReady() is true or a timeout expires. |
- void WaitTillDataReady(); |
+ // Blocks until DataReady() is true or a timeout expires. Returns false if a |
+ // timeout occurs. |
+ bool WaitTillDataReady(); |
base::SharedMemory* shared_memory_; |
@@ -83,6 +85,14 @@ class AudioSyncReader : public media::AudioOutputController::SyncReader { |
size_t renderer_callback_count_; |
size_t renderer_missed_callback_count_; |
+ // The maximum amount of time to wait for data from the renderer. Calculated |
+ // from the parameters given at construction. |
+ const base::TimeDelta maximum_wait_time_; |
+ |
+ // The index of the audio buffer we're expecting to be sent from the renderer; |
+ // used to block with timeout for audio data. |
+ uint32_t buffer_index_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AudioSyncReader); |
}; |