Index: third_party/WebKit/public/platform/WebAudioDevice.h |
diff --git a/third_party/WebKit/public/platform/WebAudioDevice.h b/third_party/WebKit/public/platform/WebAudioDevice.h |
index d27483bc32a9c5010a3cef706acba13ba0082679..69bf27437279dbb47935d26f05c45e0ff39284bb 100644 |
--- a/third_party/WebKit/public/platform/WebAudioDevice.h |
+++ b/third_party/WebKit/public/platform/WebAudioDevice.h |
@@ -34,6 +34,16 @@ |
namespace blink { |
+// Representaion of device audio stream position. |
Raymond Toy
2016/06/14 16:42:41
Typo: "Representaion" -> "Representation"
Mikhail
2016/06/17 09:36:57
Done.
|
+ |
+struct BLINK_PLATFORM_EXPORT WebAudioTimestamp { |
+ WebAudioTimestamp() = default; |
+ WebAudioTimestamp(size_t frames, double seconds) |
+ : frames(frames), seconds(seconds) {} |
+ size_t frames; |
+ double seconds; |
+}; |
+ |
// Abstract interface to the Chromium audio system. |
class WebAudioDevice { |
@@ -41,6 +51,8 @@ public: |
class BLINK_PLATFORM_EXPORT RenderCallback { |
public: |
virtual void render(const WebVector<float*>& sourceData, const WebVector<float*>& destinationData, size_t numberOfFrames); |
+ // An alternate version which provides also a current audio timestamp for the device, default implementation just invokes the above method. |
+ virtual void render(const WebVector<float*>& sourceData, const WebVector<float*>& destinationData, size_t numberOfFrames, const WebAudioTimestamp&); |
protected: |
virtual ~RenderCallback(); |