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

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

Issue 1214463003: Split "Online" and "Offline" AudioContext processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/modules/webaudio/PannerNode.cpp
diff --git a/Source/modules/webaudio/PannerNode.cpp b/Source/modules/webaudio/PannerNode.cpp
index 6504526cb60f67632f53553ec54cb4a2989f1bf8..66115a88d87dd0330769f20a336a730312ae7343 100644
--- a/Source/modules/webaudio/PannerNode.cpp
+++ b/Source/modules/webaudio/PannerNode.cpp
@@ -107,14 +107,15 @@ void PannerHandler::process(size_t framesToProcess)
MutexTryLocker tryListenerLocker(listener()->listenerLock());
if (tryLocker.locked() && tryListenerLocker.locked()) {
- // HRTFDatabase should be loaded before proceeding for offline audio context when the panning model is HRTF.
+ // HRTFDatabase should be loaded before proceeding when the panning model is HRTF.
if (m_panningModel == Panner::PanningModelHRTF && !listener()->isHRTFDatabaseLoaded()) {
- if (context()->isOfflineContext()) {
- listener()->waitForHRTFDatabaseLoaderThreadCompletion();
- } else {
+ if (context()->hasRealtimeConstraint()) {
+ // Some AudioContexts cannot block on the HRTFDatabase loader.
destination->zero();
return;
}
+
+ listener()->waitForHRTFDatabaseLoaderThreadCompletion();
}
// Apply the panning effect.

Powered by Google App Engine
This is Rietveld 408576698