Index: Source/core/platform/audio/ReverbConvolverStage.cpp |
diff --git a/Source/core/platform/audio/ReverbConvolverStage.cpp b/Source/core/platform/audio/ReverbConvolverStage.cpp |
index e4c9954910c0639082bcbff51715c5b983d38f51..51fe898315281507a1660bdde65e1f74b9259b19 100644 |
--- a/Source/core/platform/audio/ReverbConvolverStage.cpp |
+++ b/Source/core/platform/audio/ReverbConvolverStage.cpp |
@@ -58,8 +58,11 @@ ReverbConvolverStage::ReverbConvolverStage(const float* impulseResponse, size_t, |
m_fftKernel->doPaddedFFT(impulseResponse + stageOffset, stageLength); |
m_fftConvolver = adoptPtr(new FFTConvolver(fftSize)); |
} else { |
+ ASSERT(!stageOffset); |
+ ASSERT(stageLength <= fftSize / 2); |
+ |
m_directKernel = adoptPtr(new AudioFloatArray(fftSize / 2)); |
- m_directKernel->copyToRange(impulseResponse + stageOffset, 0, fftSize / 2); |
+ m_directKernel->copyToRange(impulseResponse, 0, stageLength); |
m_directConvolver = adoptPtr(new DirectConvolver(renderSliceSize)); |
} |
m_temporaryBuffer.allocate(renderSliceSize); |