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

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

Issue 2777903005: Add WebThread in AudioDestination to support AudioWorkletThread (Closed)
Patch Set: Addressing feedback Created 3 years, 9 months 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 fdb26dc8b2315a1ef8f7518ac1d4b744a8843979..8ae49569952671087644f157f73f6fdad416a328 100644
--- a/third_party/WebKit/Source/platform/audio/AudioDestination.h
+++ b/third_party/WebKit/Source/platform/audio/AudioDestination.h
@@ -43,6 +43,7 @@ namespace blink {
class PushPullFIFO;
class SecurityOrigin;
class WebAudioLatencyHint;
+class WebThread;
// The AudioDestination class is an audio sink interface between the media
// renderer and the Blink's WebAudio module. It has a FIFO to adapt the
@@ -73,6 +74,11 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback {
double delayTimestamp,
size_t priorFramesSkipped) override;
+ void requestRenderOnWebThread(size_t numberOfFrames,
+ double delay,
+ double delayTimestamp,
+ size_t priorFramesSkipped);
+
virtual void start();
virtual void stop();
@@ -95,6 +101,9 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback {
size_t m_callbackBufferSize;
bool m_isPlaying;
+ // WebThread for WebAudio rendering.
+ std::unique_ptr<WebThread> m_renderingThread;
+
// The render callback function of WebAudio engine. (i.e. DestinationNode)
AudioIOCallback& m_callback;

Powered by Google App Engine
This is Rietveld 408576698