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

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

Issue 2420983002: AudioParams with automations must process timelines (Closed)
Patch Set: Fix paths. Created 3 years, 11 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/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());

Powered by Google App Engine
This is Rietveld 408576698