summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/audio/HRTFElevation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/audio/HRTFElevation.cpp')
-rw-r--r--WebCore/platform/audio/HRTFElevation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebCore/platform/audio/HRTFElevation.cpp b/WebCore/platform/audio/HRTFElevation.cpp
index ab722cd..06d03ea 100644
--- a/WebCore/platform/audio/HRTFElevation.cpp
+++ b/WebCore/platform/audio/HRTFElevation.cpp
@@ -34,7 +34,6 @@
#include "AudioBus.h"
#include "AudioFileReader.h"
-#include "AudioResources.h"
#include "Biquad.h"
#include "FFTFrame.h"
#include "HRTFPanner.h"
@@ -108,9 +107,10 @@ bool HRTFElevation::calculateKernelsForAzimuthElevation(int azimuth, int elevati
return false;
size_t responseLength = impulseResponse->length();
+ size_t expectedLength = static_cast<size_t>(256 * (sampleRate / 44100.0));
// Check number of channels and length. For now these are fixed and known.
- bool isBusGood = responseLength == 512 && impulseResponse->numberOfChannels() == 2;
+ bool isBusGood = responseLength == expectedLength && impulseResponse->numberOfChannels() == 2;
ASSERT(isBusGood);
if (!isBusGood)
return false;