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; |