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

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: Update as review. 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
Index: Source/modules/webaudio/AudioListener.cpp
diff --git a/Source/modules/webaudio/AudioListener.cpp b/Source/modules/webaudio/AudioListener.cpp
index 94466c9a19f43f53fb90ce37373392f2ece23a7e..6225ddb088b2c548d17a311494b754cd5b19d4f2 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 WebCore {
@@ -71,6 +72,12 @@ void AudioListener::removePanner(PannerNode* panner)
}
}
+void AudioListener::createAndLoadHRTFDatabaseLoader(float sampleRate)
+{
+ if (!m_hrtfDatabaseLoader)
+ m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary(sampleRate);
+}
+
void AudioListener::markPannersAsDirty(unsigned type)
{
for (unsigned i = 0; i < m_panners.size(); ++i)

Powered by Google App Engine
This is Rietveld 408576698