diff --git a/include/SoundTouch.h b/include/SoundTouch.h index cdf5af2..208cfeb 100644 --- a/include/SoundTouch.h +++ b/include/SoundTouch.h @@ -79,10 +79,10 @@ namespace soundtouch { /// Soundtouch library version string -#define SOUNDTOUCH_VERSION "1.9.2" +#define SOUNDTOUCH_VERSION "1.9.3pre" /// SoundTouch library version id -#define SOUNDTOUCH_VERSION_ID (10902) +#define SOUNDTOUCH_VERSION_ID (10903) // // Available setting IDs for the 'setSetting' & 'get_setting' functions: diff --git a/source/SoundTouch/TDStretch.cpp b/source/SoundTouch/TDStretch.cpp index 572669c..6005eaf 100644 --- a/source/SoundTouch/TDStretch.cpp +++ b/source/SoundTouch/TDStretch.cpp @@ -303,7 +303,7 @@ int TDStretch::seekBestOverlapPositionFull(const SAMPLETYPE *refPos) int i; double norm; - bestCorr = FLT_MIN; + bestCorr = -FLT_MAX; bestOffs = 0; // Scans for the best correlation value by testing each possible position @@ -379,12 +379,10 @@ int TDStretch::seekBestOverlapPositionQuick(const SAMPLETYPE *refPos) // note: 'float' types used in this function in case that the platform would need to use software-fp - bestCorr = FLT_MIN; - bestOffs = SCANWIND; - bestCorr2 = FLT_MIN; - bestOffs2 = 0; - - int best = 0; + bestCorr = + bestCorr2 = -FLT_MAX; + bestOffs = + bestOffs2 = SCANWIND; // Scans for the best correlation value by testing each possible position // over the permitted range. Look for two best matches on the first pass to @@ -442,7 +440,6 @@ int TDStretch::seekBestOverlapPositionQuick(const SAMPLETYPE *refPos) { bestCorr = corr; bestOffs = i; - best = 1; } } @@ -464,7 +461,6 @@ int TDStretch::seekBestOverlapPositionQuick(const SAMPLETYPE *refPos) { bestCorr = corr; bestOffs = i; - best = 2; } }