| Index: media/audio/audio_output_controller.h
|
| diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h
|
| index 7820665440b4e0316e8d66a8fcfcdaade1d302db..54e5b029182090efb988b50295a3f2cdf1d4935d 100644
|
| --- a/media/audio/audio_output_controller.h
|
| +++ b/media/audio/audio_output_controller.h
|
| @@ -82,8 +82,12 @@ class MEDIA_EXPORT AudioOutputController
|
|
|
| // Notify the synchronous reader the number of bytes in the
|
| // AudioOutputController not yet played. This is used by SyncReader to
|
| - // prepare more data and perform synchronization.
|
| - virtual void UpdatePendingBytes(uint32 bytes) = 0;
|
| + // prepare more data and perform synchronization. Also inform about if any
|
| + // frames has been skipped by the consumer. The source can handle this
|
| + // appropriately depending on the type of source. An ordinary file playout
|
| + // would ignore this.
|
| + virtual void UpdatePendingBytes(uint32_t bytes,
|
| + uint32_t frames_skipped) = 0;
|
|
|
| // Attempts to completely fill |dest|, zeroing |dest| if the request can not
|
| // be fulfilled (due to timeout).
|
| @@ -154,6 +158,7 @@ class MEDIA_EXPORT AudioOutputController
|
|
|
| // AudioSourceCallback implementation.
|
| int OnMoreData(AudioBus* dest, uint32 total_bytes_delay) override;
|
| + void OnSkippedData(uint32 frames_skipped) override;
|
| void OnError(AudioOutputStream* stream) override;
|
|
|
| // AudioDeviceListener implementation. When called AudioOutputController will
|
| @@ -258,6 +263,10 @@ class MEDIA_EXPORT AudioOutputController
|
| bool ignore_errors_during_stop_close_;
|
| base::Lock error_lock_;
|
|
|
| + // Stores the number of skipped frames reported in OnSkippedData(), passed on
|
| + // to the provider in OnMoreData().
|
| + uint32_t frames_skipped_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AudioOutputController);
|
| };
|
|
|
|
|