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

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

Issue 1149913002: Access current frame counter carefully and remove m_cachedSampleFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove workaround in scriptprocessornode test Created 5 years, 7 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
« no previous file with comments | « Source/modules/webaudio/AudioDestinationNode.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioDestinationNode.cpp
diff --git a/Source/modules/webaudio/AudioDestinationNode.cpp b/Source/modules/webaudio/AudioDestinationNode.cpp
index 538a366a9c16e6424baac2ee29d0c6c9190e4e4e..920bb6cef15abd48fa14f9edccea93b494906984 100644
--- a/Source/modules/webaudio/AudioDestinationNode.cpp
+++ b/Source/modules/webaudio/AudioDestinationNode.cpp
@@ -31,6 +31,7 @@
#include "modules/webaudio/AudioNodeOutput.h"
#include "platform/audio/AudioUtilities.h"
#include "platform/audio/DenormalDisabler.h"
+#include "wtf/Atomics.h"
namespace blink {
@@ -90,7 +91,8 @@ void AudioDestinationHandler::render(AudioBus* sourceBus, AudioBus* destinationB
context()->handlePostRenderTasks();
// Advance current sample-frame.
- m_currentSampleFrame += numberOfFrames;
+ size_t newSampleFrame = m_currentSampleFrame + numberOfFrames;
+ releaseStore(&m_currentSampleFrame, newSampleFrame);
}
// ----------------------------------------------------------------
« no previous file with comments | « Source/modules/webaudio/AudioDestinationNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698