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

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

Issue 246783003: Remove enum types which are duplicated and cause error on webkit style checker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ASSERT_NOT_REACHED Created 6 years, 8 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/PannerNode.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/PannerNode.cpp
diff --git a/Source/modules/webaudio/PannerNode.cpp b/Source/modules/webaudio/PannerNode.cpp
index fc3cdfc8ebcb3b92be8e382a2f8a79311a095628..fc68098c736097510a1ebdd9c60b0867799f6bd5 100644
--- a/Source/modules/webaudio/PannerNode.cpp
+++ b/Source/modules/webaudio/PannerNode.cpp
@@ -125,7 +125,7 @@ void PannerNode::process(size_t framesToProcess)
if (tryLocker.locked() && tryListenerLocker.locked()) {
// HRTFDatabase should be loaded before proceeding for offline audio context when the panning model is HRTF.
- if (m_panningModel == HRTF && !m_hrtfDatabaseLoader->isLoaded()) {
+ if (m_panningModel == Panner::PanningModelHRTF && !m_hrtfDatabaseLoader->isLoaded()) {
if (context()->isOfflineContext()) {
m_hrtfDatabaseLoader->waitForLoaderThreadCompletion();
} else {
@@ -187,9 +187,9 @@ AudioListener* PannerNode::listener()
String PannerNode::panningModel() const
{
switch (m_panningModel) {
- case EQUALPOWER:
+ case Panner::PanningModelEqualPower:
return "equalpower";
- case HRTF:
+ case Panner::PanningModelHRTF:
return "HRTF";
default:
ASSERT_NOT_REACHED();
@@ -200,16 +200,16 @@ String PannerNode::panningModel() const
void PannerNode::setPanningModel(const String& model)
{
if (model == "equalpower")
- setPanningModel(EQUALPOWER);
+ setPanningModel(Panner::PanningModelEqualPower);
else if (model == "HRTF")
- setPanningModel(HRTF);
+ setPanningModel(Panner::PanningModelHRTF);
}
bool PannerNode::setPanningModel(unsigned model)
{
switch (model) {
- case EQUALPOWER:
- case HRTF:
+ case Panner::PanningModelEqualPower:
+ case Panner::PanningModelHRTF:
if (!m_panner.get() || model != m_panningModel) {
// This synchronizes with process().
MutexLocker processLocker(m_processLock);
@@ -219,6 +219,7 @@ bool PannerNode::setPanningModel(unsigned model)
}
break;
default:
+ ASSERT_NOT_REACHED();
return false;
}
@@ -264,6 +265,7 @@ bool PannerNode::setDistanceModel(unsigned model)
}
break;
default:
+ ASSERT_NOT_REACHED();
return false;
}
« no previous file with comments | « Source/modules/webaudio/PannerNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698