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

Unified Diff: Source/platform/audio/HRTFElevation.cpp

Issue 565643003: Move utility functions for sample rate to AudioUtilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/platform/audio/HRTFElevation.cpp
diff --git a/Source/platform/audio/HRTFElevation.cpp b/Source/platform/audio/HRTFElevation.cpp
index a7a4aac6c2a2da71ba9e209867a2d1e86b239aa7..867ebb39b9b5b1ac372eaba35a73278b8c3c050c 100644
--- a/Source/platform/audio/HRTFElevation.cpp
+++ b/Source/platform/audio/HRTFElevation.cpp
@@ -32,13 +32,15 @@
#include "platform/audio/HRTFElevation.h"
-#include <math.h>
-#include <algorithm>
#include "platform/audio/AudioBus.h"
-#include "platform/audio/HRTFPanner.h"
+#include "platform/audio/AudioUtilities.h"
+#include "platform/audio/HRTFDatabase.h"
#include "wtf/ThreadingPrimitives.h"
#include "wtf/text/StringHash.h"
+#include <algorithm>
+#include <math.h>
+
namespace blink {
const unsigned HRTFElevation::AzimuthSpacing = 15;
@@ -166,7 +168,7 @@ bool HRTFElevation::calculateKernelsForAzimuthElevation(int azimuth, int elevati
#endif
// Note that depending on the fftSize returned by the panner, we may be truncating the impulse response we just loaded in.
- const size_t fftSize = HRTFPanner::fftSizeForSampleRate(sampleRate);
+ const size_t fftSize = AudioUtilities::fftSizeForSampleRate(sampleRate);
kernelL = HRTFKernel::create(leftEarImpulseResponse, fftSize, sampleRate);
kernelR = HRTFKernel::create(rightEarImpulseResponse, fftSize, sampleRate);

Powered by Google App Engine
This is Rietveld 408576698