1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-28 08:10:11 +01:00

Sort labels after warping time, just in case...

... Time warping functions should be nondecreasing, but let's not assume so.
If not, the insertion sort just takes linear time to check that there are no
disorders.
This commit is contained in:
Paul Licameli
2016-12-15 07:28:54 -05:00
parent 37e7b5704a
commit 0be66296cd

View File

@@ -266,6 +266,10 @@ void LabelTrack::WarpLabels(const TimeWarper &warper) {
warper.Warp(labelStruct.getT0()), warper.Warp(labelStruct.getT0()),
warper.Warp(labelStruct.getT1())); warper.Warp(labelStruct.getT1()));
} }
// This should not be needed, assuming the warper is nondecreasing, but
// let's not assume too much.
SortLabels();
} }
void LabelTrack::ResetFlags() void LabelTrack::ResetFlags()