| Index: media/audio/audio_io.h
|
| diff --git a/media/audio/audio_io.h b/media/audio/audio_io.h
|
| index 66ff3f2dc98cf7af2324fa1cb58944e29c003342..bac385e0f25935d35c0defd64123ec67ba26b5e5 100644
|
| --- a/media/audio/audio_io.h
|
| +++ b/media/audio/audio_io.h
|
| @@ -49,6 +49,16 @@
|
|
|
| namespace media {
|
|
|
| +struct MEDIA_EXPORT AudioTimestamp {
|
| + int64_t frames;
|
| + int64_t ticks; // Obtained from base::TimeTicks::ToInternalValue().
|
| +};
|
| +
|
| +// Used in unittests.
|
| +inline bool operator==(const AudioTimestamp& one, const AudioTimestamp& other) {
|
| + return one.ticks == other.ticks && one.frames == other.frames;
|
| +}
|
| +
|
| class MEDIA_EXPORT AudioOutputStream {
|
| public:
|
| // Audio sources must implement AudioSourceCallback. This interface will be
|
| @@ -63,9 +73,12 @@ class MEDIA_EXPORT AudioOutputStream {
|
| // the number of frames it filled. |total_bytes_delay| contains current
|
| // number of bytes of delay buffered by the AudioOutputStream.
|
| // |frames_skipped| contains the number of frames skipped by the consumer.
|
| + // |timestamp| if provided, contains timestamp of the currently audible
|
| + // signal.
|
| virtual int OnMoreData(AudioBus* dest,
|
| uint32_t total_bytes_delay,
|
| - uint32_t frames_skipped) = 0;
|
| + uint32_t frames_skipped,
|
| + const AudioTimestamp& output_timestamp = {0, 0}) = 0;
|
|
|
| // There was an error while playing a buffer. Audio source cannot be
|
| // destroyed yet. No direct action needed by the AudioStream, but it is
|
|
|