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..e9b2e168373c337ed38d0ed234164a18b5c6cf1c 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,8 +45,13 @@ 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) |
{ |
+ { |
+ MutexLocker locker(m_mutex); |
Raymond Toy
2016/06/14 16:42:40
Can this be blocked by the main thread? Generally
hongchan
2016/06/14 17:10:38
Consider to move this operation to context's pre-r
|
+ m_outputTimestamp = outputTimestamp; |
+ } |
+ |
// We don't want denormals slowing down any of the audio processing |
// since they can very seriously hurt performance. |
// This will take care of all AudioNodes because they all process within this scope. |
@@ -105,6 +111,12 @@ void AudioDestinationHandler::render(AudioBus* sourceBus, AudioBus* destinationB |
releaseStore(&m_currentSampleFrame, newSampleFrame); |
} |
+WebAudioTimestamp AudioDestinationHandler::outputTimestamp() const |
+{ |
+ MutexLocker locker(m_mutex); |
hongchan
2016/06/14 17:10:38
This will block the audio thread when the mutex is
|
+ return m_outputTimestamp; |
+} |
+ |
// ---------------------------------------------------------------- |
AudioDestinationNode::AudioDestinationNode(AbstractAudioContext& context) |