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

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

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementation of 'AudioContext.getOutputTimestamp' method 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/platform/audio/AudioDestination.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
index 53c329f641c17533c2589b3cd08de38e5b39b820..f54a7ce416ac7251c5f541213e67a1d07173bf3d 100644
--- a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
@@ -146,8 +146,9 @@ unsigned long AudioDestination::maxChannelCount()
return static_cast<float>(Platform::current()->audioHardwareOutputChannels());
}
-void AudioDestination::render(const WebVector<float*>& sourceData, const WebVector<float*>& audioData, size_t numberOfFrames)
+void AudioDestination::render(const WebVector<float*>& sourceData, const WebVector<float*>& audioData, size_t numberOfFrames, const WebAudioTimestamp& timestamp)
{
+ m_outputTimestamp = timestamp;
Raymond Toy 2016/06/14 16:42:40 Does this need to be protected by the mutex?
Mikhail 2016/06/17 09:36:57 it looks like here it is always accessed on the sa
bool isNumberOfChannelsGood = audioData.size() == m_numberOfOutputChannels;
if (!isNumberOfChannelsGood) {
ASSERT_NOT_REACHED();
@@ -183,7 +184,7 @@ void AudioDestination::provideInput(AudioBus* bus, size_t framesToProcess)
sourceBus = m_inputBus.get();
}
- m_callback.render(sourceBus, bus, framesToProcess);
+ m_callback.render(sourceBus, bus, framesToProcess, m_outputTimestamp);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698