1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-26 02:14:22 +00:00

Minor optimisations. New method OwnedArray::insertArray(). Changed some CodeDocument inner class constructors to use references rather than pointers.

This commit is contained in:
jules 2012-07-23 07:54:23 +01:00
parent 98e37b8e7a
commit d4ae8f3d55
8 changed files with 236 additions and 235 deletions

View file

@ -135,10 +135,10 @@ void ResamplingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& inf
for (int m = info.numSamples; --m >= 0;)
{
const float alpha = (float) subSampleOffset;
const float invAlpha = 1.0f - alpha;
for (int channel = 0; channel < channelsToProcess; ++channel)
*destBuffers[channel]++ = srcBuffers[channel][bufferPos] * invAlpha + srcBuffers[channel][nextPos] * alpha;
*destBuffers[channel]++ = srcBuffers[channel][bufferPos]
+ alpha * (srcBuffers[channel][nextPos] - srcBuffers[channel][bufferPos]);
subSampleOffset += localRatio;