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

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

Issue 2171703003: Load HRTF database only when the panner is set to HRTF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/modules/webaudio/PannerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp b/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
index dacfa906e23e645496492f441e4f121c5fa8cf77..eea7d72d7c566e9e47945147022957923c2acd43 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
@@ -231,13 +231,15 @@ void AudioListener::updateState()
void AudioListener::createAndLoadHRTFDatabaseLoader(float sampleRate)
{
+ DCHECK(isMainThread());
+
if (!m_hrtfDatabaseLoader)
m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary(sampleRate);
}
bool AudioListener::isHRTFDatabaseLoaded()
{
- return m_hrtfDatabaseLoader->isLoaded();
+ return m_hrtfDatabaseLoader && m_hrtfDatabaseLoader->isLoaded();
}
void AudioListener::waitForHRTFDatabaseLoaderThreadCompletion()
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/PannerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698