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

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

Issue 2807593003: Revert of Convert RELEASE_ASSERT()/ASSERT(...) to CHECK()/DCHECK_op(...) in platform/audio (Closed)
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/platform/audio/HRTFKernel.cpp
diff --git a/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp b/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp
index f6277e16081d8aac9f84dd2b365ad36c3f3060e6..32e5a4f3841a5409bc680ab168509ff5ab050f6c 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp
+++ b/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp
@@ -53,8 +53,8 @@
return 0;
// Check for power-of-2.
- DCHECK_EQ(1UL << static_cast<unsigned>(log2(analysisFFTSize)),
- analysisFFTSize);
+ ASSERT(1UL << static_cast<unsigned>(log2(analysisFFTSize)) ==
+ analysisFFTSize);
FFTFrame estimationFrame(analysisFFTSize);
estimationFrame.doFFT(impulseP);
@@ -83,7 +83,7 @@
// Quick fade-out (apply window) at truncation point
unsigned numberOfFadeOutFrames = static_cast<unsigned>(
sampleRate / 4410); // 10 sample-frames @44.1KHz sample-rate
- DCHECK_LT(numberOfFadeOutFrames, truncatedResponseLength);
+ ASSERT(numberOfFadeOutFrames < truncatedResponseLength);
if (numberOfFadeOutFrames < truncatedResponseLength) {
for (unsigned i = truncatedResponseLength - numberOfFadeOutFrames;
i < truncatedResponseLength; ++i) {
@@ -116,18 +116,16 @@
HRTFKernel* kernel1,
HRTFKernel* kernel2,
float x) {
- DCHECK(kernel1);
- DCHECK(kernel2);
+ ASSERT(kernel1 && kernel2);
if (!kernel1 || !kernel2)
return nullptr;
- DCHECK_GE(x, 0.0);
- DCHECK_LT(x, 1.0);
+ ASSERT(x >= 0.0 && x < 1.0);
x = clampTo(x, 0.0f, 1.0f);
float sampleRate1 = kernel1->sampleRate();
float sampleRate2 = kernel2->sampleRate();
- DCHECK_EQ(sampleRate1, sampleRate2);
+ ASSERT(sampleRate1 == sampleRate2);
if (sampleRate1 != sampleRate2)
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/platform/audio/HRTFElevation.cpp ('k') | third_party/WebKit/Source/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698