From 750af63f8ff8dd2b7df0c8aad415fd407f375758 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 31 Aug 2018 16:52:54 +0100 Subject: [PATCH] Fixes to AudioBlock::copyTo and copyFrom --- modules/juce_dsp/containers/juce_AudioBlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_dsp/containers/juce_AudioBlock.h b/modules/juce_dsp/containers/juce_AudioBlock.h index 5e7df773da..081b16b157 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock.h +++ b/modules/juce_dsp/containers/juce_AudioBlock.h @@ -275,7 +275,7 @@ public: auto maxChannels = jmin (static_cast (src.getNumChannels()), static_cast (numChannels)); for (size_t ch = 0; ch < maxChannels; ++ch) - FloatVectorOperations::copy (channelPtr (ch), + FloatVectorOperations::copy (channelPtr (ch) + dstPos, src.getReadPointer (static_cast (ch), static_cast (srcPos * sizeFactor)), n); @@ -299,7 +299,7 @@ public: for (size_t ch = 0; ch < maxChannels; ++ch) FloatVectorOperations::copy (dst.getWritePointer (static_cast (ch), static_cast (dstPos * sizeFactor)), - channelPtr (ch), n); + channelPtr (ch) + srcPos, n); return *this; }