| 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..e9f57a0ce58860b5457513dd9d1450bc7b253c7f 100644
|
| --- a/content/browser/renderer_host/media/audio_sync_reader.h
|
| +++ b/content/browser/renderer_host/media/audio_sync_reader.h
|
| @@ -33,9 +33,8 @@ class AudioSyncReader : public media::AudioOutputController::SyncReader {
|
|
|
| // media::AudioOutputController::SyncReader implementations.
|
| virtual void UpdatePendingBytes(uint32 bytes) OVERRIDE;
|
| - virtual int Read(bool block,
|
| - const media::AudioBus* source,
|
| - media::AudioBus* dest) OVERRIDE;
|
| + virtual void Read(const media::AudioBus* source,
|
| + media::AudioBus* dest) OVERRIDE;
|
| virtual void Close() OVERRIDE;
|
|
|
| bool Init();
|
| @@ -47,11 +46,9 @@ class AudioSyncReader : public media::AudioOutputController::SyncReader {
|
| #endif
|
|
|
| private:
|
| - // Indicates whether the renderer has data available for reading.
|
| - bool DataReady();
|
| -
|
| - // Blocks until DataReady() is true or a timeout expires.
|
| - void WaitTillDataReady();
|
| + // Blocks until data is ready for reading or a timeout expires. Returns false
|
| + // if an error or timeout occurs.
|
| + bool WaitUntilDataIsReady();
|
|
|
| base::SharedMemory* shared_memory_;
|
|
|
| @@ -83,6 +80,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 buffer_index_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
|
| };
|
|
|
|
|