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

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

Issue 2276973002: Revert CL 2242573002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/BiquadProcessor.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp
index a665e78bb584576e26a3a510bf7da95c9676a947..781406ee1f1179bdd4953d526e9ba86e32355a0f 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp
@@ -91,6 +91,14 @@ void BiquadProcessor::process(const AudioBus* source, AudioBus* destination, siz
return;
}
+ // Synchronize with possible dynamic changes to the impulse response.
+ MutexTryLocker tryLocker(m_processLock);
+ if (!tryLocker.locked()) {
+ // Can't get the lock. We must be in the middle of changing something.
+ destination->zero();
+ return;
+ }
+
checkForDirtyCoefficients();
// For each channel of our input, process using the corresponding BiquadDSPKernel into the output channel.

Powered by Google App Engine
This is Rietveld 408576698