mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-07 07:30:02 +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
|
/// Soundtouch library version string
|
||||||
#define SOUNDTOUCH_VERSION "1.9.2"
|
#define SOUNDTOUCH_VERSION "1.9.3pre"
|
||||||
|
|
||||||
/// SoundTouch library version id
|
/// SoundTouch library version id
|
||||||
#define SOUNDTOUCH_VERSION_ID (10902)
|
#define SOUNDTOUCH_VERSION_ID (10903)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Available setting IDs for the 'setSetting' & 'get_setting' functions:
|
// Available setting IDs for the 'setSetting' & 'get_setting' functions:
|
||||||
|
|||||||
@ -303,7 +303,7 @@ int TDStretch::seekBestOverlapPositionFull(const SAMPLETYPE *refPos)
|
|||||||
int i;
|
int i;
|
||||||
double norm;
|
double norm;
|
||||||
|
|
||||||
bestCorr = FLT_MIN;
|
bestCorr = -FLT_MAX;
|
||||||
bestOffs = 0;
|
bestOffs = 0;
|
||||||
|
|
||||||
// Scans for the best correlation value by testing each possible position
|
// 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
|
// note: 'float' types used in this function in case that the platform would need to use software-fp
|
||||||
|
|
||||||
bestCorr = FLT_MIN;
|
bestCorr =
|
||||||
bestOffs = SCANWIND;
|
bestCorr2 = -FLT_MAX;
|
||||||
bestCorr2 = FLT_MIN;
|
bestOffs =
|
||||||
bestOffs2 = 0;
|
bestOffs2 = SCANWIND;
|
||||||
|
|
||||||
int best = 0;
|
|
||||||
|
|
||||||
// Scans for the best correlation value by testing each possible position
|
// 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
|
// 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;
|
bestCorr = corr;
|
||||||
bestOffs = i;
|
bestOffs = i;
|
||||||
best = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +461,6 @@ int TDStretch::seekBestOverlapPositionQuick(const SAMPLETYPE *refPos)
|
|||||||
{
|
{
|
||||||
bestCorr = corr;
|
bestCorr = corr;
|
||||||
bestOffs = i;
|
bestOffs = i;
|
||||||
best = 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user