mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-06 23:20:03 +01:00
- Fixed incorrect maximally-small float variable initialization to use -FLT_MAX instead of FLT_MIN. This glitch may have caused possible negative index access when using best overlap quick seek algorithm
- version to 1.9.3(pre)
This commit is contained in:
parent
81cb7a3406
commit
e1c7cffbcd
@ -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:
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user