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

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

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review commnets + more tests fixes + 'Packet' structure Created 4 years, 6 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/AudioDestinationNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp
index f5eea247a774b645966ee5b6ccb6e35cf9056108..469e054d031fa0b76c0fa2ff6c17166d8dcd64d5 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp
@@ -23,6 +23,7 @@
*/
#include "modules/webaudio/AudioDestinationNode.h"
+
#include "modules/webaudio/AbstractAudioContext.h"
#include "modules/webaudio/AudioNodeInput.h"
#include "modules/webaudio/AudioNodeOutput.h"
@@ -44,7 +45,7 @@ AudioDestinationHandler::~AudioDestinationHandler()
ASSERT(!isInitialized());
}
-void AudioDestinationHandler::render(AudioBus* sourceBus, AudioBus* destinationBus, size_t numberOfFrames)
+void AudioDestinationHandler::render(AudioBus* sourceBus, AudioBus* destinationBus, size_t numberOfFrames, const WebAudioTimestamp& outputTimestamp)
{
// We don't want denormals slowing down any of the audio processing
// since they can very seriously hurt performance.
@@ -74,6 +75,9 @@ void AudioDestinationHandler::render(AudioBus* sourceBus, AudioBus* destinationB
// Let the context take care of any business at the start of each render quantum.
context()->handlePreRenderTasks();
+ // Set the output device audio stream timestamp.
+ context()->setWebAudioTimestamp(outputTimestamp);
hongchan 2016/06/20 16:05:21 I prefer to have this inside of handlePreRenderTas
+
// Prepare the local audio input provider for this render quantum.
if (sourceBus)
m_localAudioInputProvider.set(sourceBus);

Powered by Google App Engine
This is Rietveld 408576698