Index: Source/modules/webaudio/AudioListener.cpp |
diff --git a/Source/modules/webaudio/AudioListener.cpp b/Source/modules/webaudio/AudioListener.cpp |
index ded20b737c556530a2eada717f00a94a9f49c4d3..2b5db9c13261aac1147b046a708d57651006af65 100644 |
--- a/Source/modules/webaudio/AudioListener.cpp |
+++ b/Source/modules/webaudio/AudioListener.cpp |
@@ -34,6 +34,7 @@ |
#include "modules/webaudio/PannerNode.h" |
#include "platform/audio/AudioBus.h" |
+#include "platform/audio/HRTFDatabaseLoader.h" |
namespace blink { |
@@ -71,6 +72,22 @@ void AudioListener::removePanner(PannerNode* panner) |
} |
} |
+void AudioListener::createAndLoadHRTFDatabaseLoader(float sampleRate) |
+{ |
+ if (!m_hrtfDatabaseLoader) |
+ m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary(sampleRate); |
+} |
+ |
+bool AudioListener::isHRTFDatabaseLoaded() |
+{ |
+ return m_hrtfDatabaseLoader->isLoaded(); |
+} |
+ |
+void AudioListener::waitForHRTFDatabaseLoaderThreadCompletion() |
+{ |
+ m_hrtfDatabaseLoader->waitForLoaderThreadCompletion(); |
+} |
+ |
void AudioListener::markPannersAsDirty(unsigned type) |
{ |
for (unsigned i = 0; i < m_panners.size(); ++i) |