mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 06:22:58 +02:00
Bug1754: Telephone and AM Radio curves should not flatten...
... Problem was a wrongly implemented comparator for wxArray Sort(). The array of points was not really sorted, and results differed with repeated calls to Sort(). Unlike with std::sort, these comparators are supposed to be trichotomous. Problem dates to commit7d5e54e364
See also commit4a500c77dd
This commit is contained in:
@@ -265,7 +265,12 @@ private:
|
||||
|
||||
static int wxCMPFUNC_CONV SortCurvePoints (EQPoint **p0, EQPoint **p1)
|
||||
{
|
||||
return (*p0)->Freq > (*p1)->Freq;
|
||||
auto diff = (*p0)->Freq - (*p1)->Freq;
|
||||
if (diff < 0)
|
||||
return -1;
|
||||
if (diff > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
|
Reference in New Issue
Block a user