int32 i = 0, j;
if (resrc->increment < 0) resrc->increment = -resrc->increment; /* In case we're coming out of a bidir loop */
- j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) + 2; // safe end+128 sample
+ j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) - 2; // safe end+128 sample
if (j > count) {j = count;}
else if(j < 0) {j = 0;}
dest = resample_linear_multi(vp, dest, j, &i);
int32 i = 0, j;
if (resrc->increment < 0) resrc->increment = -resrc->increment; /* In case we're coming out of a bidir loop */
- j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) + 2; // safe end+128 sample
+ j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) - 2; // safe end+128 sample
if (j > count) {j = count;}
else if(j < 0) {j = 0;}
dest = resample_linear_float_multi(vp, dest, j, &i);
int32 i = 0, j = 0;
if (resrc->increment < 0) resrc->increment = -resrc->increment; /* In case we're coming out of a bidir loop */
- j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) + 4; // safe end+128 sample
+ j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) - 4; // safe end+128 sample
if (j > count) {j = count;}
else if(j < 0) {j = 0;}
if((resrc->offset >> FRACTION_BITS) >= 1)
int32 i = 0, j = 0;
if (resrc->increment < 0) resrc->increment = -resrc->increment; /* In case we're coming out of a bidir loop */
- j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) + 4; // safe end+128 sample
+ j = PRECALC_LOOP_COUNT(resrc->offset, resrc->data_length, resrc->increment) - 4; // safe end+128 sample
if (j > count) {j = count;}
else if(j < 0) {j = 0;}
if((resrc->offset >> FRACTION_BITS) >= 1)