Merge pull request #1388 from birarda/master

fix sample delay pull with negative index
This commit is contained in:
Philip Rosedale 2013-12-17 11:49:37 -08:00
commit 1c46b6d482

View file

@ -162,7 +162,7 @@ int16_t* AudioRingBuffer::shiftedPositionAccomodatingWrap(int16_t* position, int
return position + numSamplesShift - _sampleCapacity;
} else if (numSamplesShift < 0 && position + numSamplesShift < _buffer) {
// this shift will go around to the end of the ring
return position + numSamplesShift - _sampleCapacity;
return position + numSamplesShift + _sampleCapacity;
} else {
return position + numSamplesShift;
}