Correct initial skip value

... so that with nominal tempo the expected best sequence overlapping
location lays in middle of the correlation window. This will ensure that
with output should be similar to input when tempo adjustment is zero.
This commit is contained in:
Olli 2021-01-28 21:28:43 +02:00
parent 5e76cf2f6d
commit 81b0d74727

View File

@ -675,7 +675,7 @@ void TDStretch::processSamples()
// Adjust processing offset at beginning of track by not perform initial overlapping
// and compensating that in the 'input buffer skip' calculation
isBeginning = false;
int skip = (int)(tempo * overlapLength + 0.5);
int skip = (int)(tempo * overlapLength + 0.5 * seekLength + 0.5);
#ifdef ST_SIMD_AVOID_UNALIGNED
// in SIMD mode, round the skip amount to value corresponding to aligned memory address