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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added implementation for ALSA. Created 4 years, 5 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/modules/webaudio/AbstractAudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
index 73236e1d13c098e2245f3a488ed36da6b5e918ad..0ef4bc8273423e3443c0fb7b466cd110271c7121 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
@@ -690,7 +690,7 @@ void AbstractAudioContext::handleStoppableSourceNodes()
}
}
-void AbstractAudioContext::handlePreRenderTasks()
+void AbstractAudioContext::handlePreRenderTasks(const WebAudioTimestamp& outputTimestamp)
{
ASSERT(isAudioThread());
@@ -707,6 +707,9 @@ void AbstractAudioContext::handlePreRenderTasks()
// Update the dirty state of the listener.
listener()->updateState();
+ // Update output timestamp.
+ m_outputTimestamp = outputTimestamp;
+
unlock();
}
}
@@ -773,6 +776,12 @@ void AbstractAudioContext::rejectPendingDecodeAudioDataResolvers()
m_decodeAudioResolvers.clear();
}
+WebAudioTimestamp AbstractAudioContext::outputTimestamp()
+{
+ AutoLocker locker(this);
+ return m_outputTimestamp;
+}
+
void AbstractAudioContext::rejectPendingResolvers()
{
ASSERT(isMainThread());

Powered by Google App Engine
This is Rietveld 408576698