example/stretcher/soundtouch.js
function(pInputPos) {
            var pInput = this._inputBuffer.vector;
            pInputPos += this._inputBuffer.startIndex;

            var pOutput = this._outputBuffer.vector,
                pOutputPos = this._outputBuffer.endIndex,
                i,
                cnt2,
                fTemp,
                fScale,
                fi,
                pInputOffset,
                pOutputOffset;

            fScale = 1 / this.overlapLength;
            for (i = 0; i < this.overlapLength; i++) {
                fTemp = (this.overlapLength - i) * fScale;
                fi = i * fScale;
                cnt2 = 2 * i;
                pInputOffset = cnt2 + pInputPos;
                pOutputOffset = cnt2 + pOutputPos;
                pOutput[pOutputOffset + 0] =
                    pInput[pInputOffset + 0] * fi +
                    this.pMidBuffer[cnt2 + 0] * fTemp;
                pOutput[pOutputOffset + 1] =
                    pInput[pInputOffset + 1] * fi +
                    this.pMidBuffer[cnt2 + 1] * fTemp;
            }
        }
function(pInputPos) {
            var pInput = this._inputBuffer.vector;
            pInputPos += this._inputBuffer.startIndex;

            var pOutput = this._outputBuffer.vector,
                pOutputPos = this._outputBuffer.endIndex,
                i,
                cnt2,
                fTemp,
                fScale,
                fi,
                pInputOffset,
                pOutputOffset;

            fScale = 1 / this.overlapLength;
            for (i = 0; i < this.overlapLength; i++) {
                fTemp = (this.overlapLength - i) * fScale;
                fi = i * fScale;
                cnt2 = 2 * i;
                pInputOffset = cnt2 + pInputPos;
                pOutputOffset = cnt2 + pOutputPos;
                pOutput[pOutputOffset + 0] =
                    pInput[pInputOffset + 0] * fi +
                    this.pMidBuffer[cnt2 + 0] * fTemp;
                pOutput[pOutputOffset + 1] =
                    pInput[pInputOffset + 1] * fi +
                    this.pMidBuffer[cnt2 + 1] * fTemp;
            }
        }
function ( pInputPos ) { var pInput = this . _inputBuffer . vector ; pInputPos += this . _inputBuffer . startIndex ; var pOutput = this . _outputBuffer . vector , pOutputPos = this . _outputBuffer . endIndex , i , cnt2 , fTemp , fScale , fi , pInputOffset , pOutputOffset ; fScale = 1 / this . overlapLength ; for ( i = 0 ; i < this . overlapLength ; i ++ ) { fTemp = ( this . overlapLength - i ) * fScale ; fi = i * fScale ; cnt2 = 2 * i ; pInputOffset = cnt2 + pInputPos ; pOutputOffset = cnt2 + pOutputPos ; pOutput [ pOutputOffset + 0 ] = pInput [ pInputOffset + 0 ] * fi + this . pMidBuffer [ cnt2 + 0 ] * fTemp ; pOutput [ pOutputOffset + 1 ] = pInput [ pInputOffset + 1 ] * fi + this . pMidBuffer [ cnt2 + 1 ] * fTemp ; } }
Overlaps samples in 'midBuffer' with the samples in 'pInput'
Overlaps samples in midBuffer with the samples in pInput