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

Method Permute

libraries/lib-track/Track.cpp:503–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503void TrackList::Permute(const std::vector<Track *> &tracks)
504{
505 std::vector<TrackNodePointer> permutation;
506 for (const auto pTrack : tracks)
507 for (const auto pChannel : Channels(pTrack))
508 permutation.push_back(pChannel->GetNode());
509 for (const auto iter : permutation) {
510 ListOfTracks::value_type track = *iter;
511 erase(iter);
512 Track *pTrack = track.get();
513 pTrack->SetOwner(shared_from_this(), insert(ListOfTracks::end(), track));
514 }
515 auto n = getBegin();
516 RecalcPositions(n);
517 PermutationEvent(n);
518}
519
520Track *TrackList::FindById( TrackId id )
521{

Callers 2

DoMixAndRenderFunction · 0.80
DoSortTracksFunction · 0.80

Calls 7

getBeginFunction · 0.85
GetNodeMethod · 0.80
SetOwnerMethod · 0.80
ChannelsFunction · 0.70
endFunction · 0.70
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected