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

Unified Diff: Source/core/platform/audio/HRTFKernel.cpp

Issue 20294002: Fix trailing whitespace in .cpp, .h, and .idl files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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
« no previous file with comments | « Source/core/platform/audio/HRTFKernel.h ('k') | Source/core/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/HRTFKernel.cpp
diff --git a/Source/core/platform/audio/HRTFKernel.cpp b/Source/core/platform/audio/HRTFKernel.cpp
index e7432a1f3b7f7a0369c23213696f4398ab538b39..d825962cd3761c1f65071f074d3b479af74656e8 100644
--- a/Source/core/platform/audio/HRTFKernel.cpp
+++ b/Source/core/platform/audio/HRTFKernel.cpp
@@ -48,14 +48,14 @@ namespace WebCore {
static float extractAverageGroupDelay(AudioChannel* channel, size_t analysisFFTSize)
{
ASSERT(channel);
-
+
float* impulseP = channel->mutableData();
-
+
bool isSizeGood = channel->length() >= analysisFFTSize;
ASSERT(isSizeGood);
if (!isSizeGood)
return 0;
-
+
// Check for power-of-2.
ASSERT(1UL << static_cast<unsigned>(log2(analysisFFTSize)) == analysisFFTSize);
@@ -115,18 +115,18 @@ PassRefPtr<HRTFKernel> HRTFKernel::createInterpolatedKernel(HRTFKernel* kernel1,
ASSERT(kernel1 && kernel2);
if (!kernel1 || !kernel2)
return 0;
-
+
ASSERT(x >= 0.0 && x < 1.0);
x = min(1.0f, max(0.0f, x));
-
+
float sampleRate1 = kernel1->sampleRate();
float sampleRate2 = kernel2->sampleRate();
ASSERT(sampleRate1 == sampleRate2);
if (sampleRate1 != sampleRate2)
return 0;
-
+
float frameDelay = (1 - x) * kernel1->frameDelay() + x * kernel2->frameDelay();
-
+
OwnPtr<FFTFrame> interpolatedFrame = FFTFrame::createInterpolatedFrame(*kernel1->fftFrame(), *kernel2->fftFrame(), x);
return HRTFKernel::create(interpolatedFrame.release(), frameDelay, sampleRate1);
}
« no previous file with comments | « Source/core/platform/audio/HRTFKernel.h ('k') | Source/core/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698