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

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

Issue 393363002: Move handle of HRTFDatabaseLoader to AudioListener. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move all HRTF loader functionality to AudioListener. Created 6 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 | « Source/modules/webaudio/AudioListener.h ('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/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)
« no previous file with comments | « Source/modules/webaudio/AudioListener.h ('k') | Source/modules/webaudio/PannerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698