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

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

Issue 176683003: HRTFDatabaseLoader is not an absolute condition to run audioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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.cpp ('k') | Source/modules/webaudio/PannerNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/OfflineAudioDestinationNode.cpp
diff --git a/Source/modules/webaudio/OfflineAudioDestinationNode.cpp b/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
index 055458216a64496c7eb5edf634a72d7bd8ac2217..4d10226a14fce9af496bcee54a569a4031222571 100644
--- a/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
+++ b/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
@@ -96,6 +96,11 @@ void OfflineAudioDestinationNode::offlineRender()
if (!m_renderBus.get())
return;
+ bool isAudioContextInitialized = context()->isInitialized();
+ ASSERT(isAudioContextInitialized);
+ if (!isAudioContextInitialized)
+ return;
+
bool channelsMatch = m_renderBus->numberOfChannels() == m_renderTarget->numberOfChannels();
ASSERT(channelsMatch);
if (!channelsMatch)
@@ -106,15 +111,6 @@ void OfflineAudioDestinationNode::offlineRender()
if (!isRenderBusAllocated)
return;
- // Synchronize with HRTFDatabaseLoader.
- // The database must be loaded before we can proceed.
- HRTFDatabaseLoader* loader = context()->hrtfDatabaseLoader();
- ASSERT(loader);
- if (!loader)
- return;
-
- loader->waitForLoaderThreadCompletion();
-
// Break up the render target into smaller "render quantize" sized pieces.
// Render until we're finished.
size_t framesToProcess = m_renderTarget->length();
« no previous file with comments | « Source/modules/webaudio/AudioDestinationNode.cpp ('k') | Source/modules/webaudio/PannerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698