Fixed a bug introduced in r245 that caused small constant time offset in the output vs. input stream

This commit is contained in:
oparviai 2017-04-07 19:01:22 +00:00
parent c31fca9c9f
commit 92bfdd1e8d
2 changed files with 6 additions and 6 deletions

View File

@ -587,8 +587,8 @@ this corresponds to lowering the pitch by -0.318 semitones:</p>
<ul> <ul>
<li>Improved SoundTouch::flush() function so that it returns precisely the desired amount of samples for exact output duration control</li> <li>Improved SoundTouch::flush() function so that it returns precisely the desired amount of samples for exact output duration control</li>
<li>Redesigned quickseek algorithm for improved sound quality when using the quickseek mode. The new quickseek algorithm can find 99% as good results as the <li>Redesigned quickseek algorithm for improved sound quality when using the quickseek mode. The new quickseek algorithm can find 99% as good results as the
default full-scan mode, while the quickseek algorithm is remarkable less default full-scan mode, while the quickseek algorithm is remarkable less
CPU intensive.</li> CPU intensive.</li>
<li>Added adaptive integer divider scaling for improved sound quality when using integer processing algorithm <li>Added adaptive integer divider scaling for improved sound quality when using integer processing algorithm
</li> </li>
</ul> </ul>
@ -855,6 +855,7 @@ submitted bugfixes:</p>
<li> Mathias Möhl</li> <li> Mathias Möhl</li>
<li> Yuval Naveh</li> <li> Yuval Naveh</li>
<li> Mats Palmgren </li> <li> Mats Palmgren </li>
<li> Chandni Patel</li>
<li> Paulo Pizarro</li> <li> Paulo Pizarro</li>
<li> Andrey Ponomarenko</li> <li> Andrey Ponomarenko</li>
<li> Blaise Potard</li> <li> Blaise Potard</li>

View File

@ -675,11 +675,10 @@ void TDStretch::processSamples()
} }
else else
{ {
// Adjust processing offset at beginning of track: // Adjust processing offset at beginning of track by not perform initial overlapping
// - do not perform initial overlapping // and compensating that in the 'input buffer skip' calculation
// - compensate expected value of 'seekBestOverlapPosition' offset landing to middle of seekLength
isBeginning = false; isBeginning = false;
int skip = overlapLength + seekLength / 2; int skip = (int)(tempo * overlapLength + 0.5);
#ifdef SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION #ifdef SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION
#ifdef SOUNDTOUCH_ALLOW_SSE #ifdef SOUNDTOUCH_ALLOW_SSE