Index: third_party/WebKit/Source/platform/audio/AudioDSPKernelProcessor.cpp |
diff --git a/third_party/WebKit/Source/platform/audio/AudioDSPKernelProcessor.cpp b/third_party/WebKit/Source/platform/audio/AudioDSPKernelProcessor.cpp |
index e973b30a4f700d71932f2c9294732197fda0859d..4223908e0f24f8425783c7a950ebdcfbb1b6a7a6 100644 |
--- a/third_party/WebKit/Source/platform/audio/AudioDSPKernelProcessor.cpp |
+++ b/third_party/WebKit/Source/platform/audio/AudioDSPKernelProcessor.cpp |
@@ -96,6 +96,20 @@ void AudioDSPKernelProcessor::process(const AudioBus* source, |
} |
} |
+void AudioDSPKernelProcessor::processOnlyAudioParams(size_t framesToProcess) { |
+ if (!isInitialized()) |
+ return; |
+ |
+ MutexTryLocker tryLocker(m_processLock); |
+ // Only update the AudioParams if we can get the lock. If not, some |
+ // other thread is updating the kernels, so we'll have to skip it |
+ // this time. |
+ if (tryLocker.locked()) { |
+ for (unsigned i = 0; i < m_kernels.size(); ++i) |
+ m_kernels[i]->processOnlyAudioParams(framesToProcess); |
+ } |
+} |
+ |
// Resets filter state |
void AudioDSPKernelProcessor::reset() { |
ASSERT(isMainThread()); |