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

Unified Diff: third_party/WebKit/Source/platform/audio/AudioResamplerKernel.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/AudioResamplerKernel.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioResamplerKernel.cpp b/third_party/WebKit/Source/platform/audio/AudioResamplerKernel.cpp
index 973a1cb6d2e0f2da5a527feda405c224feb97c70..3a9486182c9dfd6fbb9ea1242f78fd6b0ddb82ac 100644
--- a/third_party/WebKit/Source/platform/audio/AudioResamplerKernel.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioResamplerKernel.cpp
@@ -46,7 +46,7 @@
float* AudioResamplerKernel::getSourcePointer(
size_t framesToProcess,
size_t* numberOfSourceFramesNeededP) {
- DCHECK_LE(framesToProcess, MaxFramesToProcess);
+ ASSERT(framesToProcess <= MaxFramesToProcess);
// Calculate the next "virtual" index. After process() is called,
// m_virtualReadIndex will equal this value.
@@ -75,7 +75,7 @@
}
void AudioResamplerKernel::process(float* destination, size_t framesToProcess) {
- DCHECK_LE(framesToProcess, MaxFramesToProcess);
+ ASSERT(framesToProcess <= MaxFramesToProcess);
float* source = m_sourceBuffer.data();
@@ -92,11 +92,11 @@
double virtualReadIndex = m_virtualReadIndex;
// Sanity check source buffer access.
- DCHECK_GT(framesToProcess, 0u);
- DCHECK_GE(virtualReadIndex, 0);
- DCHECK_LT(1 + static_cast<unsigned>(virtualReadIndex +
- (framesToProcess - 1) * rate),
- m_sourceBuffer.size());
+ ASSERT(framesToProcess > 0);
+ ASSERT(virtualReadIndex >= 0 &&
+ 1 + static_cast<unsigned>(virtualReadIndex +
+ (framesToProcess - 1) * rate) <
+ m_sourceBuffer.size());
// Do the linear interpolation.
int n = framesToProcess;

Powered by Google App Engine
This is Rietveld 408576698