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

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

Issue 2478283003: Use kRenderQuantumFrames in more places (Closed)
Patch Set: Created 4 years, 1 month 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 | « third_party/WebKit/Source/platform/audio/AudioDestination.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
diff --git a/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp b/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
index d1240e0f5328d247b9502c52dee15fd52c84967e..c86871dcce8d9680ab31eb495f02c8436fbf38e0 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
+++ b/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
@@ -38,7 +38,6 @@ namespace blink {
const double MaxDelayTimeSeconds = 0.002;
const int UninitializedAzimuth = -1;
-const unsigned RenderingQuantum = 128;
HRTFPanner::HRTFPanner(float sampleRate, HRTFDatabaseLoader* databaseLoader)
: Panner(PanningModelHRTF),
@@ -57,10 +56,10 @@ HRTFPanner::HRTFPanner(float sampleRate, HRTFDatabaseLoader* databaseLoader)
m_convolverR2(fftSizeForSampleRate(sampleRate)),
m_delayLineL(MaxDelayTimeSeconds, sampleRate),
m_delayLineR(MaxDelayTimeSeconds, sampleRate),
- m_tempL1(RenderingQuantum),
- m_tempR1(RenderingQuantum),
- m_tempL2(RenderingQuantum),
- m_tempR2(RenderingQuantum) {
+ m_tempL1(AudioUtilities::kRenderQuantumFrames),
+ m_tempR1(AudioUtilities::kRenderQuantumFrames),
+ m_tempL2(AudioUtilities::kRenderQuantumFrames),
+ m_tempR2(AudioUtilities::kRenderQuantumFrames) {
ASSERT(databaseLoader);
}
@@ -210,11 +209,11 @@ void HRTFPanner::pan(double desiredAzimuth,
}
// This algorithm currently requires that we process in power-of-two size
- // chunks at least RenderingQuantum.
+ // chunks at least AudioUtilities::kRenderQuantumFrames.
ASSERT(1UL << static_cast<int>(log2(framesToProcess)) == framesToProcess);
- ASSERT(framesToProcess >= RenderingQuantum);
+ DCHECK_GE(framesToProcess, AudioUtilities::kRenderQuantumFrames);
- const unsigned framesPerSegment = RenderingQuantum;
+ const unsigned framesPerSegment = AudioUtilities::kRenderQuantumFrames;
const unsigned numberOfSegments = framesToProcess / framesPerSegment;
for (unsigned segment = 0; segment < numberOfSegments; ++segment) {
« no previous file with comments | « third_party/WebKit/Source/platform/audio/AudioDestination.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698