Audacity 3.2.0
|
Classes | |
class | AllClipsConstIterator |
class | AllClipsIterator |
Typedefs | |
using | SampleBlockID = long long |
using | SampleBlockIDSet = std::unordered_set< SampleBlockID > |
using | BlockVisitor = std::function< void(const std::shared_ptr< SampleBlock > &)> |
using | BlockInspector = std::function< void(std::shared_ptr< const SampleBlock >)> |
using | IntervalHolder = std::shared_ptr< WaveTrack::Interval > |
using | IntervalHolders = std::vector< IntervalHolder > |
using | IntervalConstHolder = std::shared_ptr< const WaveTrack::Interval > |
using | ProgressReport = std::function< bool(double)> |
Functions | |
IteratorRange< AllClipsIterator > | GetAllClips (WaveTrack &track) |
IteratorRange< AllClipsConstIterator > | GetAllClips (const WaveTrack &track) |
WAVE_TRACK_API bool | Reverse (WaveTrack &track, sampleCount start, sampleCount len, const ProgressReport &report={}) |
WAVE_TRACK_API sampleCount | GetSequenceSamplesCount (const WaveTrack &track) |
WAVE_TRACK_API size_t | CountBlocks (const WaveTrack &track) |
WAVE_TRACK_API void | CloseLock (WaveTrack &track) noexcept |
Should be called upon project close. Not balanced by unlocking calls. More... | |
WAVE_TRACK_API bool | RemoveCutLine (WaveTrack &track, double cutLinePosition) |
Remove cut line, without expanding the audio in it. More... | |
WAVE_TRACK_API void | ExpandCutLine (WaveTrack &track, double cutLinePosition, double *cutlineStart=nullptr, double *cutlineEnd=nullptr) |
WAVE_TRACK_API bool | HasHiddenData (const WaveTrack &track) |
Whether any clips have hidden audio. More... | |
WAVE_TRACK_API void | DiscardTrimmed (WaveTrack &track) |
Remove hidden audio from all clips. More... | |
WAVE_TRACK_API void | VisitBlocks (TrackList &tracks, BlockVisitor visitor, SampleBlockIDSet *pIDs=nullptr) |
WAVE_TRACK_API void | InspectBlocks (const TrackList &tracks, BlockInspector inspector, SampleBlockIDSet *pIDs=nullptr) |
WAVE_TRACK_API WaveTrack::IntervalConstHolders | GetClipsIntersecting (const WaveTrack &track, double t0, double t1) |
WAVE_TRACK_API void | ExpandClipTillNextOne (const WaveTrack &track, WaveTrack::Interval &interval) |
using WaveTrackUtilities::BlockInspector = typedef std::function<void(std::shared_ptr<const SampleBlock>)> |
Definition at line 37 of file WaveTrackUtilities.h.
using WaveTrackUtilities::BlockVisitor = typedef std::function<void(const std::shared_ptr<SampleBlock> &)> |
Definition at line 35 of file WaveTrackUtilities.h.
using WaveTrackUtilities::IntervalConstHolder = typedef std::shared_ptr<const WaveTrack::Interval> |
Definition at line 42 of file WaveTrackUtilities.h.
using WaveTrackUtilities::IntervalHolder = typedef std::shared_ptr<WaveTrack::Interval> |
Definition at line 40 of file WaveTrackUtilities.h.
using WaveTrackUtilities::IntervalHolders = typedef std::vector<IntervalHolder> |
Definition at line 41 of file WaveTrackUtilities.h.
using WaveTrackUtilities::ProgressReport = typedef std::function<bool(double)> |
Argument is in (0, 1)
Definition at line 128 of file WaveTrackUtilities.h.
using WaveTrackUtilities::SampleBlockID = typedef long long |
Definition at line 33 of file WaveTrackUtilities.h.
using WaveTrackUtilities::SampleBlockIDSet = typedef std::unordered_set<SampleBlockID> |
Definition at line 34 of file WaveTrackUtilities.h.
|
noexcept |
Should be called upon project close. Not balanced by unlocking calls.
Definition at line 286 of file WaveTrackUtilities.cpp.
Referenced by ProjectFileManager::CompactProjectOnClose(), ProjectFileManager::DiscardAutosave(), and ProjectFileManager::OpenProjectFile().
size_t WaveTrackUtilities::CountBlocks | ( | const WaveTrack & | track | ) |
Definition at line 278 of file WaveTrackUtilities.cpp.
References WaveTrack::Intervals().
Referenced by anonymous_namespace{EditMenus.cpp}::EstimateCopiedBlocks().
void WaveTrackUtilities::DiscardTrimmed | ( | WaveTrack & | track | ) |
Remove hidden audio from all clips.
Definition at line 360 of file WaveTrackUtilities.cpp.
References WaveTrack::Intervals().
Referenced by anonymous_namespace{EditMenus.cpp}::DuplicateDiscardTrimmed().
void WaveTrackUtilities::ExpandClipTillNextOne | ( | const WaveTrack & | track, |
WaveTrack::Interval & | interval | ||
) |
Definition at line 416 of file WaveTrackUtilities.cpp.
References forward, WaveTrack::GetNextInterval(), and WaveClip::StretchRightTo().
Referenced by PitchAndSpeedDialog::PopulateOrExchange().
void WaveTrackUtilities::ExpandCutLine | ( | WaveTrack & | track, |
double | cutLinePosition, | ||
double * | cutlineStart = nullptr , |
||
double * | cutlineEnd = nullptr |
||
) |
Expand cut line (that is, re-insert audio, then delete audio saved in cut line)
Definition at line 305 of file WaveTrackUtilities.cpp.
References BadUserAction, details::end(), GetEditClipsCanMove(), WaveTrack::Intervals(), and XO().
Referenced by CutlineHandle::Click().
|
inline |
Definition at line 121 of file WaveTrackUtilities.h.
|
inline |
Definition at line 116 of file WaveTrackUtilities.h.
Referenced by VisitBlocks().
WaveTrack::IntervalConstHolders WaveTrackUtilities::GetClipsIntersecting | ( | const WaveTrack & | track, |
double | t0, | ||
double | t1 | ||
) |
Definition at line 404 of file WaveTrackUtilities.cpp.
References WaveTrack::Intervals().
Referenced by WaveChannelSubView::GetMenuItems(), anonymous_namespace{EditMenus.cpp}::JoinClipsAvailableFlag(), and SelectActions::Handler::OnZeroCrossing().
sampleCount WaveTrackUtilities::GetSequenceSamplesCount | ( | const WaveTrack & | track | ) |
Definition at line 270 of file WaveTrackUtilities.cpp.
References WaveTrack::Intervals().
Referenced by anonymous_namespace{EditMenus.cpp}::EstimateCopyBytesCount(), FormatMenuTable::OnFormatChange(), and WaveClip::WriteXML().
bool WaveTrackUtilities::HasHiddenData | ( | const WaveTrack & | track | ) |
Whether any clips have hidden audio.
Definition at line 352 of file WaveTrackUtilities.cpp.
References WaveTrack::Intervals().
void WaveTrackUtilities::InspectBlocks | ( | const TrackList & | tracks, |
BlockInspector | inspector, | ||
SampleBlockIDSet * | pIDs = nullptr |
||
) |
Definition at line 397 of file WaveTrackUtilities.cpp.
References tracks, and VisitBlocks().
Referenced by anonymous_namespace{HistoryWindow.cpp}::SpaceUsageCalculator::CalculateUsage(), ProjectFileIO::CopyTo(), EstimateRemovedBlocks(), ProjectFileIO::GetCurrentUsage(), ProjectFileIO::SaveProject(), and ProjectFileIO::ShouldCompact().
bool WaveTrackUtilities::RemoveCutLine | ( | WaveTrack & | track, |
double | cutLinePosition | ||
) |
Remove cut line, without expanding the audio in it.
Definition at line 292 of file WaveTrackUtilities.cpp.
References WaveTrack::Intervals().
Referenced by CutlineHandle::Click().
bool WaveTrackUtilities::Reverse | ( | WaveTrack & | track, |
sampleCount | start, | ||
sampleCount | len, | ||
const ProgressReport & | report = {} |
||
) |
Definition at line 126 of file WaveTrackUtilities.cpp.
References _, details::end(), WaveTrack::InsertInterval(), WideSampleSequence::LongSamplesToTime(), min(), WaveTrack::RemoveInterval(), anonymous_namespace{WaveTrackUtilities.cpp}::ReverseOneClip(), WideSampleSequence::SnapToSample(), WaveTrack::SortedIntervalArray(), and WaveTrack::SplitAt().
Referenced by Reverse::Process().
void WaveTrackUtilities::VisitBlocks | ( | TrackList & | tracks, |
BlockVisitor | visitor, | ||
SampleBlockIDSet * | pIDs = nullptr |
||
) |
Definition at line 376 of file WaveTrackUtilities.cpp.
References GetAllClips(), and tracks.
Referenced by InspectBlocks(), and audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::VisitBlocks().