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

Unified Diff: third_party/WebKit/Source/platform/audio/FFTFrame.cpp

Issue 1636873005: blink: Fix naming and const-ness of constants and non-constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants: indents Created 4 years, 11 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: third_party/WebKit/Source/platform/audio/FFTFrame.cpp
diff --git a/third_party/WebKit/Source/platform/audio/FFTFrame.cpp b/third_party/WebKit/Source/platform/audio/FFTFrame.cpp
index 76534ed65c68d5b1828e1a4353fdaec06b4aa7f2..5abb2e33c09f1f7549a7e742538beab4c3fde0b2 100644
--- a/third_party/WebKit/Source/platform/audio/FFTFrame.cpp
+++ b/third_party/WebKit/Source/platform/audio/FFTFrame.cpp
@@ -180,7 +180,7 @@ double FFTFrame::extractAverageGroupDelay()
int halfSize = fftSize() / 2;
- const double kSamplePhaseDelay = (twoPiDouble) / double(fftSize());
+ const double samplePhaseDelay = (twoPiDouble) / static_cast<double>(fftSize());
// Calculate weighted average group delay
for (int i = 0; i < halfSize; i++) {
@@ -203,7 +203,7 @@ double FFTFrame::extractAverageGroupDelay()
// Note how we invert the phase delta wrt frequency since this is how group delay is defined
double ave = aveSum / weightSum;
- double aveSampleDelay = -ave / kSamplePhaseDelay;
+ double aveSampleDelay = -ave / samplePhaseDelay;
// Leave 20 sample headroom (for leading edge of impulse)
if (aveSampleDelay > 20.0)
@@ -225,9 +225,9 @@ void FFTFrame::addConstantGroupDelay(double sampleFrameDelay)
float* realP = realData();
float* imagP = imagData();
- const double kSamplePhaseDelay = (twoPiDouble) / double(fftSize());
+ const double samplePhaseDelay = (twoPiDouble) / static_cast<double>(fftSize());
- double phaseAdj = -sampleFrameDelay * kSamplePhaseDelay;
+ double phaseAdj = -sampleFrameDelay * samplePhaseDelay;
// Add constant group delay
for (int i = 1; i < halfSize; i++) {

Powered by Google App Engine
This is Rietveld 408576698