| Index: Source/core/platform/audio/ReverbAccumulationBuffer.cpp
|
| diff --git a/Source/core/platform/audio/ReverbAccumulationBuffer.cpp b/Source/core/platform/audio/ReverbAccumulationBuffer.cpp
|
| index f1d79caa7ce78094378d5f5b776d02ab596953c7..e7506fa0152f1127ad8c525829b13c9a28c9cd19 100644
|
| --- a/Source/core/platform/audio/ReverbAccumulationBuffer.cpp
|
| +++ b/Source/core/platform/audio/ReverbAccumulationBuffer.cpp
|
| @@ -49,7 +49,7 @@ void ReverbAccumulationBuffer::readAndClear(float* destination, size_t numberOfF
|
| {
|
| size_t bufferLength = m_buffer.size();
|
| bool isCopySafe = m_readIndex <= bufferLength && numberOfFrames <= bufferLength;
|
| -
|
| +
|
| ASSERT(isCopySafe);
|
| if (!isCopySafe)
|
| return;
|
| @@ -81,7 +81,7 @@ void ReverbAccumulationBuffer::updateReadIndex(int* readIndex, size_t numberOfFr
|
| int ReverbAccumulationBuffer::accumulate(float* source, size_t numberOfFrames, int* readIndex, size_t delayFrames)
|
| {
|
| size_t bufferLength = m_buffer.size();
|
| -
|
| +
|
| size_t writeIndex = (*readIndex + delayFrames) % bufferLength;
|
|
|
| // Update caller's readIndex
|
| @@ -101,7 +101,7 @@ int ReverbAccumulationBuffer::accumulate(float* source, size_t numberOfFrames, i
|
| vadd(source, 1, destination + writeIndex, 1, destination + writeIndex, 1, numberOfFrames1);
|
|
|
| // Handle wrap-around if necessary
|
| - if (numberOfFrames2 > 0)
|
| + if (numberOfFrames2 > 0)
|
| vadd(source + numberOfFrames1, 1, destination, 1, destination, 1, numberOfFrames2);
|
|
|
| return writeIndex;
|
|
|