MCPcopy Create free account
hub / github.com/audacity/audacity / WarpLabels

Method WarpLabels

libraries/lib-label-track/LabelTrack.cpp:325–335  ·  view source on GitHub ↗

Move the labels in the track according to the given TimeWarper. (If necessary this could be optimised by ignoring labels that occur before a specified time, as in most cases they don't need to move.)

Source from the content-addressed store, hash-verified

323// (If necessary this could be optimised by ignoring labels that occur before a
324// specified time, as in most cases they don't need to move.)
325void LabelTrack::WarpLabels(const TimeWarper &warper) {
326 for (auto &labelStruct: mLabels) {
327 labelStruct.selectedRegion.setTimes(
328 warper.Warp(labelStruct.getT0()),
329 warper.Warp(labelStruct.getT1()));
330 }
331
332 // This should not be needed, assuming the warper is nondecreasing, but
333 // let's not assume too much.
334 SortLabels();
335}
336
337LabelStruct::LabelStruct(const SelectedRegion &region,
338 const wxString& aTitle)

Callers 3

ProcessLabelTrackMethod · 0.80
ProcessLabelTrackMethod · 0.80
ProcessLabelTrackMethod · 0.80

Calls 2

setTimesMethod · 0.80
WarpMethod · 0.45

Tested by

no test coverage detected