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

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

Issue 565643003: Move utility functions for sample rate to AudioUtilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add modification in MediaElementSourceNode. 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
« no previous file with comments | « Source/platform/audio/AudioUtilities.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/audio/HRTFPanner.cpp
diff --git a/Source/platform/audio/HRTFPanner.cpp b/Source/platform/audio/HRTFPanner.cpp
index 851410a61a04a0459d6627280bdf565679a45b5d..d730289347e9dd7d206df57c92a56e14a5fe4edd 100644
--- a/Source/platform/audio/HRTFPanner.cpp
+++ b/Source/platform/audio/HRTFPanner.cpp
@@ -30,6 +30,7 @@
#include <algorithm>
#include "platform/audio/AudioBus.h"
+#include "platform/audio/AudioUtilities.h"
#include "platform/audio/HRTFDatabase.h"
#include "wtf/MathExtras.h"
#include "wtf/RefPtr.h"
@@ -82,7 +83,7 @@ size_t HRTFPanner::fftSizeForSampleRate(float sampleRate)
// The resampled length is used to compute the FFT size by choosing a power of two that is
// greater than or equal the resampled length. This power of two is doubled to get the actual FFT size.
- ASSERT(sampleRate >= 3000 && sampleRate <= 192000);
+ ASSERT(AudioUtilities::isValidAudioBufferSampleRate(sampleRate));
int truncatedImpulseLength = 256;
double sampleRateRatio = sampleRate / 44100;
« no previous file with comments | « Source/platform/audio/AudioUtilities.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698