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

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

Issue 14636011: Support multiple HRTFDatabases for different sample-rates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/PannerNode.cpp
diff --git a/Source/modules/webaudio/PannerNode.cpp b/Source/modules/webaudio/PannerNode.cpp
index 147126b676dac9a2e04924b0f655dd9e90abf220..4845b32b64fd03c071afce64101e5e621fd4ea8c 100644
--- a/Source/modules/webaudio/PannerNode.cpp
+++ b/Source/modules/webaudio/PannerNode.cpp
@@ -144,8 +144,9 @@ void PannerNode::initialize()
{
if (isInitialized())
return;
-
- m_panner = Panner::create(m_panningModel, sampleRate());
+
+ HRTFDatabase* database = context()->hrtfDatabaseLoader()->database();
Ken Russell (switch to Gerrit) 2013/05/11 01:35:16 There's a race condition in the fetching of the HR
Chris Rogers 2013/05/13 20:05:22 Good point, I'll switch this back to the previous
+ m_panner = Panner::create(m_panningModel, sampleRate(), database);
AudioNode::initialize();
}
@@ -199,8 +200,9 @@ bool PannerNode::setPanningModel(unsigned model)
if (!m_panner.get() || model != m_panningModel) {
// This synchronizes with process().
MutexLocker processLocker(m_pannerLock);
-
- OwnPtr<Panner> newPanner = Panner::create(model, sampleRate());
+
+ HRTFDatabase* database = context()->hrtfDatabaseLoader()->database();
+ OwnPtr<Panner> newPanner = Panner::create(model, sampleRate(), database);
m_panner = newPanner.release();
m_panningModel = model;
}

Powered by Google App Engine
This is Rietveld 408576698