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

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

Issue 196993002: Guarantee a thread safety when accessing source location info in pannerNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 | Source/modules/webaudio/PannerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/PannerNode.h
diff --git a/Source/modules/webaudio/PannerNode.h b/Source/modules/webaudio/PannerNode.h
index 3f5ef90618a2ba36a15dfe43c0675e7e40552d7f..2a29d01f6bdbfe4cd74cf4abf4e51118ca50a1c8 100644
--- a/Source/modules/webaudio/PannerNode.h
+++ b/Source/modules/webaudio/PannerNode.h
@@ -116,6 +116,7 @@ public:
double coneOuterGain() const { return m_coneEffect.outerGain(); }
void setConeOuterGain(double angle) { m_coneEffect.setOuterGain(angle); }
+ // It must be called on audio thread, currently called only process() in AudioBufferSourceNode.
double dopplerRate();
virtual double tailTime() const OVERRIDE { return m_panner ? m_panner->tailTime() : 0; }
@@ -145,6 +146,7 @@ private:
OwnPtr<Panner> m_panner;
unsigned m_panningModel;
+ unsigned m_distanceModel;
// Current source location information
FloatPoint3D m_position;
@@ -176,8 +178,8 @@ private:
// AudioContext's connection count
unsigned m_connectionCount;
- // Synchronize process() and setPanningModel() which can change the panner.
- mutable Mutex m_pannerLock;
+ // Synchronize process() with setting of the panning model, distance model and caching of the source location/orientation info.
+ mutable Mutex m_processLock;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/modules/webaudio/PannerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698