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

Unified Diff: Source/modules/webaudio/ScriptProcessorNode.cpp

Issue 773273002: Update the current frame count in a safe place (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Modify test to allow 1 block delay. Created 6 years 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
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/ScriptProcessorNode.cpp
diff --git a/Source/modules/webaudio/ScriptProcessorNode.cpp b/Source/modules/webaudio/ScriptProcessorNode.cpp
index 7e660aae5bbd7d900e89f468b86b1c4da49a6817..b5d17eac02e754850233545a4a14c2562d66854f 100644
--- a/Source/modules/webaudio/ScriptProcessorNode.cpp
+++ b/Source/modules/webaudio/ScriptProcessorNode.cpp
@@ -259,7 +259,7 @@ void ScriptProcessorNode::fireProcessEvent()
// Calculate a playbackTime with the buffersize which needs to be processed each time onaudioprocess is called.
// The outputBuffer being passed to JS will be played after exhuasting previous outputBuffer by double-buffering.
- double playbackTime = (context()->currentSampleFrame() + m_bufferSize) / static_cast<double>(context()->sampleRate());
+ double playbackTime = (context()->cachedSampleFrame() + m_bufferSize) / static_cast<double>(context()->sampleRate());
// Call the JavaScript event handler which will do the audio processing.
dispatchEvent(AudioProcessingEvent::create(inputBuffer, outputBuffer, playbackTime));
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698