Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(885)

Unified Diff: third_party/WebKit/Source/platform/audio/AudioDestination.h

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from Raymond and miu@ Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/audio/AudioDestination.h
diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.h b/third_party/WebKit/Source/platform/audio/AudioDestination.h
index dda3527f57476e3697025958418f64c07573959d..60a862e7d2febce47428dfa79242d1b22c08adb1 100644
--- a/third_party/WebKit/Source/platform/audio/AudioDestination.h
+++ b/third_party/WebKit/Source/platform/audio/AudioDestination.h
@@ -82,7 +82,11 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback,
// WebAudioDevice::RenderCallback
void render(const WebVector<float*>& sourceData,
const WebVector<float*>& audioData,
- size_t numberOfFrames) override;
+ size_t numberOfFrames,
+ double delay, // Output delay in seconds.
miu 2016/11/29 20:51:04 suggestion: Just in case others get confused the w
miu 2016/12/01 05:33:17 Didn't see this addressed in PS10 (and looks like
Mikhail 2016/12/02 11:48:21 Done. Thanks for suggestion!
+ double delayTimestamp, // System timestamp in seconds when
+ // |delay| was obtained.
+ size_t priorFramesSkipped) override;
// AudioSourceProvider
void provideInput(AudioBus*, size_t framesToProcess) override;
@@ -109,6 +113,10 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback,
std::unique_ptr<AudioFIFO> m_inputFifo;
std::unique_ptr<AudioPullFIFO> m_fifo;
+
+ size_t m_framesElapsed;
+ AudioIOPosition m_outputPosition;
+ base::TimeTicks m_outputPositionReceivedTimestamp;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698