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

Method VisitBlocks

libraries/lib-wave-track/WaveTrackUtilities.cpp:376–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376void WaveTrackUtilities::VisitBlocks(TrackList &tracks, BlockVisitor visitor,
377 SampleBlockIDSet *pIDs)
378{
379 for (auto wt : tracks.Any<WaveTrack>())
380 // Scan all clips within current track
381 for (const auto &pClip : GetAllClips(*wt))
382 // Scan all sample blocks within current clip
383 for (const auto &pChannel : pClip->Channels()) {
384 auto blocks = pChannel->GetSequenceBlockArray();
385 for (const auto &block : *blocks) {
386 auto &pBlock = block.sb;
387 if (pBlock) {
388 if (pIDs && !pIDs->insert(pBlock->GetBlockID()).second)
389 continue;
390 if (visitor)
391 visitor(pBlock);
392 }
393 }
394 }
395}
396
397void WaveTrackUtilities::InspectBlocks(const TrackList &tracks,
398 BlockInspector inspector, SampleBlockIDSet *pIDs)

Callers

nothing calls this directly

Calls 5

GetAllClipsFunction · 0.85
ChannelsMethod · 0.80
GetSequenceBlockArrayMethod · 0.80
insertMethod · 0.45
GetBlockIDMethod · 0.45

Tested by

no test coverage detected