![]() |
Audacity 3.2.0
|
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list of tracks, event notifications. More...
#include <Track.h>
Public Types | |
using | iterator = TrackIter< Track > |
using | const_iterator = TrackIter< const Track > |
using | value_type = Track * |
using | Updater = std::function< void(Track &dest, const Track &src) > |
![]() | |
using | message_type = TrackListEvent |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const TrackListEvent &) > |
Type of functions that can be connected to the Publisher. More... | |
Public Member Functions | |
TrackList (AudacityProject *pOwner) | |
void | Swap (TrackList &that) |
virtual | ~TrackList () |
AudacityProject * | GetOwner () |
const AudacityProject * | GetOwner () const |
wxString | MakeUniqueTrackName (const wxString &baseTrackName) const |
Returns string that contains baseTrackName, but is guaranteed to be unique among other tracks in that list. More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
template<typename TrackType = Track> | |
auto | Find (Track *pTrack) -> TrackIter< TrackType > |
Turn a pointer into a TrackIter (constant time); get end iterator if this does not own the track. More... | |
template<typename TrackType = const Track> | |
auto | Find (const Track *pTrack) const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIter< TrackType > > |
Turn a pointer into a TrackIter (constant time); get end iterator if this does not own the track. More... | |
TrackIter< Track > | FindLeader (Track *pTrack) |
TrackIter< const Track > | FindLeader (const Track *pTrack) const |
template<typename TrackType = Track> | |
auto | Any () -> TrackIterRange< TrackType > |
template<typename TrackType = const Track> | |
auto | Any () const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
template<typename TrackType = Track> | |
auto | Selected () -> TrackIterRange< TrackType > |
template<typename TrackType = const Track> | |
auto | Selected () const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
template<typename TrackType = Track> | |
auto | Leaders () -> TrackIterRange< TrackType > |
template<typename TrackType = const Track> | |
auto | Leaders () const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
template<typename TrackType = Track> | |
auto | SelectedLeaders () -> TrackIterRange< TrackType > |
template<typename TrackType = const Track> | |
auto | SelectedLeaders () const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
void | Permute (const std::vector< TrackNodePointer > &permutation) |
For use in sorting: assume each iterator points into this list, no duplications. More... | |
Track * | FindById (TrackId id) |
template<typename TrackKind > | |
TrackKind * | AddToHead (const std::shared_ptr< TrackKind > &t) |
Add a Track, giving it a fresh id. More... | |
template<typename TrackKind > | |
TrackKind * | Add (const std::shared_ptr< TrackKind > &t) |
void | UnlinkChannels (Track &track) |
Removes linkage if track belongs to a group. More... | |
bool | MakeMultiChannelTrack (Track &first, int nChannels, bool aligned) |
Converts channels to a multichannel track. More... | |
ListOfTracks::value_type | Replace (Track *t, const ListOfTracks::value_type &with) |
TrackNodePointer | Remove (Track *t) |
Remove the Track and return an iterator to what followed it. More... | |
void | Clear (bool sendEvent=true) |
Make the list empty. More... | |
bool | CanMoveUp (Track *t) const |
bool | CanMoveDown (Track *t) const |
bool | MoveUp (Track *t) |
bool | MoveDown (Track *t) |
bool | Move (Track *t, bool up) |
bool | Contains (const Track *t) const |
Mainly a test function. Uses a linear search, so could be slow. More... | |
template<typename Subclass > | |
std::shared_ptr< Subclass > | Lock (const std::weak_ptr< Subclass > &wTrack) |
bool | empty () const |
size_t | size () const |
double | GetStartTime () const |
double | GetEndTime () const |
double | GetMinOffset () const |
std::shared_ptr< Track > | RegisterPendingChangedTrack (Updater updater, Track *src) |
void | RegisterPendingNewTrack (const std::shared_ptr< Track > &pTrack) |
void | UpdatePendingTracks () |
void | ClearPendingTracks (ListOfTracks *pAdded=nullptr) |
bool | ApplyPendingTracks () |
bool | HasPendingTracks () const |
![]() | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
![]() | |
virtual | ~Base () |
Static Public Member Functions | |
static TrackList & | Get (AudacityProject &project) |
static const TrackList & | Get (const AudacityProject &project) |
static TrackList * | FindUndoTracks (const UndoStackElem &state) |
static std::shared_ptr< TrackList > | Create (AudacityProject *pOwner) |
template<typename TrackType > | |
static auto | SingletonRange (TrackType *pTrack) -> TrackIterRange< TrackType > |
template<typename TrackType > | |
static auto | Channels (TrackType *pTrack) -> TrackIterRange< TrackType > |
static bool | SwapChannels (Track &track) |
If the given track is one of a pair of channels, swap them. More... | |
Private Member Functions | |
TrackList (const TrackList &that)=delete | |
TrackList & | operator= (const TrackList &)=delete |
TrackList (TrackList &&that)=delete | |
TrackList & | operator= (TrackList &&)=delete |
void | clear ()=delete |
Track * | DoAddToHead (const std::shared_ptr< Track > &t) |
Track * | DoAdd (const std::shared_ptr< Track > &t) |
template<typename TrackType = Track, typename Pred = typename TrackIterRange< TrackType >::iterator::FunctionType> | |
auto | Tracks (const Pred &pred={}) -> TrackIterRange< TrackType > |
template<typename TrackType = const Track, typename Pred = typename TrackIterRange< TrackType >::iterator::FunctionType> | |
auto | Tracks (const Pred &pred={}) const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
Track * | GetPrev (Track *t, bool linked=false) const |
Track * | GetNext (Track *t, bool linked=false) const |
Return a track in the list that comes after Track t. More... | |
template<typename TrackType > | |
TrackIter< TrackType > | MakeTrackIterator (TrackNodePointer iter) const |
template<typename TrackType > | |
TrackIter< TrackType > | EndIterator () const |
TrackIterRange< Track > | EmptyRange () const |
bool | isNull (TrackNodePointer p) const |
TrackNodePointer | getEnd () const |
TrackNodePointer | getBegin () const |
TrackNodePointer | getNext (TrackNodePointer p) const |
Move an iterator to the next node, if any; else stay at end. More... | |
TrackNodePointer | getPrev (TrackNodePointer p) const |
Move an iterator to the previous node, if any; else wrap to end. More... | |
void | RecalcPositions (TrackNodePointer node) |
void | QueueEvent (TrackListEvent event) |
void | SelectionEvent (const std::shared_ptr< Track > &pTrack) |
void | PermutationEvent (TrackNodePointer node) |
void | DataEvent (const std::shared_ptr< Track > &pTrack, int code) |
void | EnsureVisibleEvent (const std::shared_ptr< Track > &pTrack, bool modifyState) |
void | DeletionEvent (std::weak_ptr< Track > node, bool duringReplace) |
void | AdditionEvent (TrackNodePointer node) |
void | ResizingEvent (TrackNodePointer node) |
void | SwapNodes (TrackNodePointer s1, TrackNodePointer s2) |
Static Private Member Functions | |
template<typename TrackType , typename InTrackType > | |
static TrackIterRange< TrackType > | Channels_ (TrackIter< InTrackType > iter1) |
Private Attributes | |
AudacityProject * | mOwner |
ListOfTracks | mPendingUpdates |
Shadow tracks holding append-recording in progress; need to put them into a list so that GetLink() works. More... | |
std::vector< Updater > | mUpdaters |
This is in correspondence with mPendingUpdates. More... | |
Static Private Attributes | |
static long | sCounter = -1 |
Friends | |
class | Track |
Additional Inherited Members | |
![]() | |
static constexpr bool | notifies_all |
![]() | |
CallbackReturn | Publish (const TrackListEvent &message) |
Send a message to connected callbacks. More... | |
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list of tracks, event notifications.
using TrackList::const_iterator = TrackIter<const Track> |
using TrackList::iterator = TrackIter<Track> |
using TrackList::Updater = std::function< void(Track &dest, const Track &src) > |
using TrackList::value_type = Track * |
|
privatedelete |
|
privatedelete |
|
explicit |
|
virtual |
|
inline |
Definition at line 1567 of file Track.h.
Referenced by ApplyPendingTracks(), LabelTrack::Create(), EffectBase::DoEffect(), anonymous_namespace{EditMenus.cpp}::FinishCopy(), AUPImportFileHandle::HandleLabelTrack(), AUPImportFileHandle::HandleNoteTrack(), AUPImportFileHandle::HandleTimeTrack(), AUPImportFileHandle::HandleWaveTrack(), EffectBase::Preview(), EffectBase::ReplaceProcessedTracks(), anonymous_namespace{Track.cpp}::TrackListRestorer::TrackListRestorer(), and LabelDialog::TransferDataFromWindow().
|
private |
Definition at line 625 of file Track.cpp.
References TrackListEvent::ADDITION, and QueueEvent().
Referenced by ApplyPendingTracks(), DoAdd(), and DoAddToHead().
|
inline |
Add a Track, giving it a fresh id.
Definition at line 1563 of file Track.h.
|
inline |
Definition at line 1440 of file Track.h.
Referenced by anonymous_namespace{Track.cpp}::Accumulate(), ImportCommand::Apply(), LabelDefaultClickHandle::Click(), Effect::CopyInputTracks(), ExportMultipleDialog::CountTracksAndLabels(), ExportPlugin::CreateMixer(), anonymous_namespace{EditMenus.cpp}::CutCopyAvailableFlag(), LabelTrackView::DoKeyDown(), LyricsPanel::DoUpdateLyrics(), TrackPanel::DrawTracks(), anonymous_namespace{LabelMenus.cpp}::EditByLabel(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), ControlToolBar::EnableDisableButtons(), TranscriptionToolBar::EnableDisableButtons(), GetInfoCommand::ExploreTrackPanel(), ExportMultipleDialog::ExportMultipleByTrack(), LabelDialog::FindAllLabels(), anonymous_namespace{Snap.cpp}::FindCandidates(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), anonymous_namespace{EditMenus.cpp}::ForEachCopiedWaveTrack(), GetAllSeqBlocks(), GetNumExportChannels(), TrackView::GetTotalHeight(), anonymous_namespace{EditMenus.cpp}::HasHiddenData(), MixerBoard::HasSolo(), ClipMoveState::Init(), LabelTracksExistFlag(), MakeUniqueTrackName(), anonymous_namespace{ExportMIDI.cpp}::NoteTracksExistFlag(), ProjectAudioManager::OnRecord(), LabelDialog::OnSelectCell(), ScreenshotBigDialog::OnShortTracks(), anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord(), TranscriptionToolBar::PlayAtSpeed(), EffectBase::Preview(), EffectFindClipping::Process(), RealtimeEffectPanel::RealtimeEffectPanel(), SelectionStateChanger::SelectionStateChanger(), SelectionState::SelectNone(), SelectionState::SelectRangeOfTracks(), TracksExistFlag(), LabelDialog::TransferDataFromWindow(), TransportTracks::TransportTracks(), TrackPanel::UpdateVRulerSize(), VisitBlocks(), WaveTracksExistFlag(), ZoomInAvailableFlag(), ZoomOutAvailableFlag(), and SelectionStateChanger::~SelectionStateChanger().
|
inline |
bool TrackList::ApplyPendingTracks | ( | ) |
Definition at line 1145 of file Track.cpp.
References Add(), AdditionEvent(), PackedArray::begin(), ClearPendingTracks(), FindById(), mPendingUpdates, RecalcPositions(), Replace(), sCounter, and UpdatePendingTracks().
Referenced by ProjectAudioManager::OnCommitRecording().
|
inline |
Definition at line 1393 of file Track.h.
Referenced by TimeShiftHandle::DoSlideVertical(), empty(), HasPendingTracks(), and EffectTruncSilence::ProcessAll().
|
inline |
bool TrackList::CanMoveDown | ( | Track * | t | ) | const |
Definition at line 911 of file Track.cpp.
References GetNext().
bool TrackList::CanMoveUp | ( | Track * | t | ) | const |
|
inline |
Definition at line 1397 of file Track.h.
References PackedArray::begin().
|
inline |
Definition at line 1398 of file Track.h.
References PackedArray::end().
|
inlinestatic |
Definition at line 1544 of file Track.h.
Referenced by AppendItem(), SelectTracksCommand::Apply(), SetTrackBase::Apply(), WaveTrackView::CaptureKey(), anonymous_namespace{ClipMenus.cpp}::ChannelsHaveDifferentClipBoundaries(), anonymous_namespace{TrackPanel.cpp}::ResizingChannelGroup::Children(), anonymous_namespace{TrackPanel.cpp}::Subgroup::Children(), anonymous_namespace{TrackPanel.cpp}::ChannelGroup::Children(), ProjectAudioManager::ChooseExistingRecordingTracks(), TrackPanelResizeHandle::Click(), CutlineHandle::Click(), EnvelopeHandle::Click(), WaveformPrefs::Commit(), MinimizeButtonHandle::CommitChanges(), TrackShifter::CommonMayMigrateTo(), WaveTrackView::CopySelectedText(), WaveTrackView::CutSelectedText(), anonymous_namespace{TrackMenus.cpp}::DoAlign(), anonymous_namespace{ClipMenus.cpp}::DoClipMove(), WaveTrackSubView::DoDetailedHitTest(), WaveformVRulerControls::DoHandleWheelRotation(), SpectrumVRulerControls::DoHandleWheelRotation(), ClipMoveState::DoHorizontalOffset(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), TrackUtilities::DoRemoveTrack(), anonymous_namespace{TrackMenus.cpp}::DoSortTracks(), TrackUtilities::DoTrackMute(), TrackUtilities::DoTrackSolo(), SpectrumVZoomHandle::DoZoom(), WaveformVZoomHandle::DoZoom(), TrackPanelResizeHandle::Drag(), anonymous_namespace{TrackPanel.cpp}::ChannelGroup::Draw(), TrackPanelResizerCell::Draw(), SpectrumView::Draw(), WaveformView::Draw(), ExportMultipleDialog::ExportMultipleByTrack(), anonymous_namespace{TrackPanel.cpp}::FindAdjustedChannelHeights(), anonymous_namespace{Mix.cpp}::FindBufferSize(), anonymous_namespace{ClipMenus.cpp}::FindClipBoundaries(), anonymous_namespace{ClipMenus.cpp}::FindClips(), anonymous_namespace{WaveClipTrimHandle.cpp}::FindClipsInChannels(), anonymous_namespace{RealtimeEffectManager.cpp}::FindStates(), anonymous_namespace{EditMenus.cpp}::ForEachCopiedWaveTrack(), MixerSource::GetChannel(), TrackView::GetChannelGroupHeight(), ContrastDialog::GetDB(), CommonTrackView::GetMinimizedHeight(), MixerTrackCluster::GetRight(), VampEffect::Init(), ClipMoveState::Init(), TrackPanelAx::IsFocused(), LOFImportFileHandle::lofOpenFiles(), AudioGraph::MakeChannelMap(), anonymous_namespace{EffectStage.cpp}::MakeInstances(), MixAndRender(), MixerSource::MixerSource(), TrackPanel::OnEnsureVisible(), FormatMenuTable::OnFormatChange(), WaveTrackMenuTable::OnMultiView(), anonymous_namespace{EditMenus.cpp}::OnPaste(), WaveTrackMenuTable::OnSetDisplay(), TrackMenuTable::OnSetName(), SpectrumVRulerMenuTable::OnSpectrumScaleType(), anonymous_namespace{EditMenus.cpp}::OnSplit(), WaveTrackMenuTable::OnSwapChannels(), WaveColorMenuTable::OnWaveColorChange(), WaveformVRulerMenuTable::OnWaveformScaleType(), WaveTrackView::PasteText(), SpectrumPrefs::Preview(), EffectLoudness::Process(), EffectNormalize::Process(), NyquistEffect::Process(), EffectSBSMS::Process(), EffectStereoToMono::Process(), VampEffect::Process(), EffectTruncSilence::ProcessIndependently(), NyquistEffect::ProcessOne(), PerTrackEffect::ProcessPass(), AudioIO::ProcessPlaybackSlices(), TrackPanel::RefreshTrack(), SpectrumPrefs::Rollback(), WaveTrackView::SelectAllText(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::SelectedClipOfFocusedTrack(), SelectionState::SelectTrack(), SelectionState::SelectTrackLength(), GetInfoCommand::SendTracks(), TrackView::SetMinimized(), RateMenuTable::SetRate(), anonymous_namespace{TrackMenus.cpp}::SetTrackGain(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), GainSliderHandle::SetValue(), PanSliderHandle::SetValue(), ScreenshotBigDialog::SizeTracks(), WaveTrackMenuTable::SplitStereo(), anonymous_namespace{WaveTrackControls.cpp}::Status1DrawFunction(), SwapNodes(), TrackPanelResizeHandle::TrackPanelResizeHandle(), AudioIO::TransformPlayBuffers(), AudioIoCallback::TransportState::TransportState(), UnlinkChannels(), and TrackPanel::UpdateTrackVRuler().
|
inlinestaticprivate |
Definition at line 1522 of file Track.h.
References Track::Any(), and TrackIter< TrackType >::Filter().
|
privatedelete |
void TrackList::Clear | ( | bool | sendEvent = true | ) |
Make the list empty.
Definition at line 820 of file Track.cpp.
References DeletionEvent(), mPendingUpdates, and mUpdaters.
Referenced by ~TrackList().
void TrackList::ClearPendingTracks | ( | ListOfTracks * | pAdded = nullptr | ) |
Definition at line 1104 of file Track.cpp.
References PackedArray::begin(), DeletionEvent(), empty(), PackedArray::end(), getBegin(), mPendingUpdates, mUpdaters, and RecalcPositions().
Referenced by ApplyPendingTracks(), ProjectAudioManager::CancelRecording(), and AudacityApp::OnExceptionInMainLoop().
bool TrackList::Contains | ( | const Track * | t | ) | const |
Mainly a test function. Uses a linear search, so could be slow.
Definition at line 1005 of file Track.cpp.
References make_iterator_range().
|
static |
Definition at line 503 of file Track.cpp.
Referenced by Effect::CopyInputTracks(), ProjectFileManager::DoSave(), anonymous_namespace{EditMenus.cpp}::DuplicateDiscardTrimmed(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{EditMenus.cpp}::OnCut(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), EffectBase::Preview(), EffectTwoPassSimpleMono::Process(), EffectManager::PromptUser(), ProjectFileManager::ReadProjectFile(), and ProjectFileIO::SaveProject().
|
private |
Definition at line 601 of file Track.cpp.
References QueueEvent(), and TrackListEvent::TRACK_DATA_CHANGE.
|
private |
Definition at line 619 of file Track.cpp.
References TrackListEvent::DELETION, and QueueEvent().
Referenced by Clear(), ClearPendingTracks(), and Remove().
Definition at line 712 of file Track.cpp.
References AdditionEvent(), getEnd(), getPrev(), RecalcPositions(), and sCounter.
Definition at line 700 of file Track.cpp.
References AdditionEvent(), getBegin(), RecalcPositions(), sCounter, Track::SetId(), and Track::SetOwner().
bool TrackList::empty | ( | ) | const |
Definition at line 1010 of file Track.cpp.
References begin(), and end().
Referenced by anonymous_namespace{Track.cpp}::Accumulate(), ClearPendingTracks(), ProjectFileManager::Import(), ApplyMacroDialog::OnApplyToFiles(), and size().
|
private |
Definition at line 635 of file Track.cpp.
References Track::Any(), and getEnd().
|
inline |
Definition at line 1394 of file Track.h.
Referenced by TimeShiftHandle::DoSlideVertical(), empty(), FindUndoTracks(), HasPendingTracks(), MakeMultiChannelTrack(), and RecalcPositions().
|
inline |
|
inlineprivate |
|
private |
Definition at line 607 of file Track.cpp.
References QueueEvent(), and TrackListEvent::TRACK_REQUEST_VISIBLE.
|
inline |
Turn a pointer into a TrackIter (constant time); get end iterator if this does not own the track.
const overload will only produce iterators over const TrackType
Definition at line 1414 of file Track.h.
|
inline |
Turn a pointer into a TrackIter (constant time); get end iterator if this does not own the track.
Definition at line 1402 of file Track.h.
Referenced by TimeShiftHandle::DoSlideVertical(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), anonymous_namespace{TrackView.cpp}::TrackPositioner::OnUpdate(), and RecalcPositions().
Definition at line 689 of file Track.cpp.
References PackedArray::begin(), and PackedArray::end().
Referenced by ApplyPendingTracks(), TrackPanelAx::IsFocused(), and UpdatePendingTracks().
auto TrackList::FindLeader | ( | Track * | pTrack | ) |
Definition at line 645 of file Track.cpp.
References ActiveProjects::Find(), and Track::IsLeader().
Referenced by TrackPanel::FindTrackRect(), TrackPanel::RefreshTrack(), TrackFocus::Set(), and SwapNodes().
|
static |
Definition at line 1395 of file Track.cpp.
References end(), UndoState::extensions, exts, and UndoStackElem::state.
Referenced by anonymous_namespace{HistoryWindow.cpp}::SpaceUsageCalculator::Calculate(), ProjectFileManager::Compact(), and EstimateRemovedBlocks().
|
static |
Definition at line 487 of file Track.cpp.
References key.
Referenced by SelectUtilities::ActivatePlayRegion(), ProjectFileManager::AddImportedTracks(), SelectHandle::AdjustSelection(), AdornedRulerPanel::AdornedRulerPanel(), AnyTracksSelectedPred(), AppendItem(), ImportCommand::Apply(), ScreenshotCommand::Apply(), SelectTimeCommand::Apply(), SelectTracksCommand::Apply(), SetLabelCommand::Apply(), SetTrackBase::Apply(), BrushHandleHitTest(), TrackSelectHandle::CalculateRearrangingThresholds(), TrackPanelResizeHandle::Cancel(), ProjectAudioManager::CancelRecording(), anonymous_namespace{Track.cpp}::TrackListRestorer::CanUndoOrRedo(), Exporter::CheckMix(), ProjectAudioManager::ChooseExistingRecordingTracks(), ButtonHandle::Click(), TrackPanelResizeHandle::Click(), LabelDefaultClickHandle::Click(), LabelGlyphHandle::Click(), BrushHandle::Click(), SelectHandle::Click(), TimeShiftHandle::Click(), BackgroundHandle::Click(), anonymous_namespace{EditMenus.cpp}::CutCopyAvailableFlag(), ProjectAudioIO::DefaultOptionsFactory(), anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), anonymous_namespace{TrackMenus.cpp}::DoAlign(), anonymous_namespace{SelectMenus.cpp}::DoBoundaryMove(), anonymous_namespace{ClipMenus.cpp}::DoClipLeftOrRight(), LOFImportFileHandle::doDurationAndScrollOffset(), LabelTrackView::DoEditLabels(), EffectUI::DoEffect(), anonymous_namespace{FileMenus.cpp}::DoExport(), DoImportMIDI(), LabelTrackView::DoKeyDown(), SelectUtilities::DoListSelection(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel(), TrackUtilities::DoMoveTrack(), anonymous_namespace{NavigationMenus.cpp}::DoNextTrack(), anonymous_namespace{TrackMenus.cpp}::DoPanTracks(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), anonymous_namespace{EditMenus.cpp}::DoPasteText(), anonymous_namespace{NavigationMenus.cpp}::DoPrevTrack(), ProjectAudioManager::DoRecord(), TrackUtilities::DoRemoveTrack(), TrackUtilities::DoRemoveTracks(), ProjectFileManager::DoSave(), SelectUtilities::DoSelectSomething(), anonymous_namespace{SelectUtilities.cpp}::DoSelectTimeAndAudioTracks(), SelectUtilities::DoSelectTimeAndTracks(), anonymous_namespace{TrackMenus.cpp}::DoSortTracks(), TrackUtilities::DoTrackMute(), TrackUtilities::DoTrackSolo(), LyricsPanel::DoUpdateLyrics(), ProjectWindow::DoZoomFit(), anonymous_namespace{ViewMenus.cpp}::DoZoomFitV(), ButtonHandle::Drag(), TrackPanelResizeHandle::Drag(), LabelTextHandle::Drag(), NoteTrackVZoomHandle::Drag(), SpectrumVZoomHandle::Drag(), WaveformVZoomHandle::Drag(), TimeTrackVZoomHandle::Drag(), BrushHandle::Drag(), SelectHandle::Drag(), TimeShiftHandle::Drag(), TrackSelectHandle::Drag(), anonymous_namespace{DropoutDetector.cpp}::DropoutSubscription::DropoutSubscription(), EditableTracksSelectedPred(), cloud::ShareAudioToolbar::EnableDisableButtons(), ControlToolBar::EnableDisableButtons(), TranscriptionToolBar::EnableDisableButtons(), EstimateRemovedBlocks(), Exporter::ExamineTracks(), TimerRecordDialog::ExecutePostRecordActions(), GetInfoCommand::ExploreTrackPanel(), ExportCL::Export(), ExportFFmpeg::Export(), ExportFLAC::Export(), ExportMP3::Export(), ExportOGG::Export(), ExportPCM::Export(), ExportWavPack::Export(), cloud::audiocom::ShareAudioDialog::ExportProject(), anonymous_namespace{ClipMenus.cpp}::FindClipBoundaries(), anonymous_namespace{ClipMenus.cpp}::FindClips(), ProjectWindow::FixScrollbars(), SpectrumView::ForAll(), ProjectFileIO::GenerateDoc(), Get(), GetAllSeqBlocks(), FrequencyPlotDialog::GetAudio(), ContrastDialog::GetDB(), GetPropertiesOfSelected(), CompareAudioCommand::GetSelection(), SliderHandle::GetSlider(), ScreenshotCommand::GetTrackRect(), TrackPanelAx::GetTracks(), ProjectWindow::GetZoomOfToFit(), LabelGlyphHandle::HandleGlyphDragRelease(), AUPImportFileHandle::HandleImport(), AUPImportFileHandle::HandleLabelTrack(), AUPImportFileHandle::HandleNoteTrack(), AUPImportFileHandle::HandleTimeTrack(), AUPImportFileHandle::HandleWaveTrack(), SelectHandle::HitTest(), ProjectFileManager::Import(), AUPImportFileHandle::Import(), anonymous_namespace{ProjectFileManager.cpp}::ImportProject(), EffectEqualization::Init(), NyquistEffect::Init(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), LabelTracksExistFlag(), LOFImportFileHandle::lofOpenFiles(), MixerBoard::MixerBoard(), anonymous_namespace{SelectMenus.cpp}::MoveWhenAudioInactive(), anonymous_namespace{TrackMenus.cpp}::MuteTracks(), anonymous_namespace{SelectMenus.cpp}::NearestZeroCrossing(), WaveTrack::New(), LabelTrack::New(), NoteTrack::New(), TimeTrack::New(), anonymous_namespace{ExportMIDI.cpp}::NoteTracksExistFlag(), ApplyMacroDialog::OnApplyToFiles(), ProjectManager::OnCloseWindow(), ViewActions::Handler::OnCollapseAllTracks(), ProjectAudioManager::OnCommitRecording(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{LabelMenus.cpp}::OnCopyLabels(), SelectActions::Handler::OnCursorTrackEnd(), SelectActions::Handler::OnCursorTrackStart(), anonymous_namespace{EditMenus.cpp}::OnCut(), anonymous_namespace{LabelMenus.cpp}::OnCutLabels(), anonymous_namespace{EditMenus.cpp}::OnDelete(), anonymous_namespace{LabelMenus.cpp}::OnDeleteLabels(), anonymous_namespace{EditMenus.cpp}::OnDisjoin(), anonymous_namespace{LabelMenus.cpp}::OnDisjoinLabels(), anonymous_namespace{EditMenus.cpp}::OnDuplicate(), AudacityApp::OnExceptionInMainLoop(), ViewActions::Handler::OnExpandAllTracks(), anonymous_namespace{FileMenus.cpp}::OnExportLabels(), anonymous_namespace{ExportMIDI.cpp}::OnExportMIDI(), NavigationActions::Handler::OnFirstTrack(), ContrastDialog::OnGetBackground(), ContrastDialog::OnGetForeground(), anonymous_namespace{FileMenus.cpp}::OnImportLabels(), anonymous_namespace{EditMenus.cpp}::OnJoin(), anonymous_namespace{LabelMenus.cpp}::OnJoinLabels(), NavigationActions::Handler::OnLastTrack(), WaveTrackMenuTable::OnMergeStereo(), anonymous_namespace{LabelMenus.cpp}::OnNewLabelTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), anonymous_namespace{TimeTrackMenuItems.cpp}::OnNewTimeTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack(), anonymous_namespace{FileMenus.cpp}::OnOpen(), anonymous_namespace{EditMenus.cpp}::OnPaste(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{Printing.cpp}::OnPrint(), ProjectAudioManager::OnRecord(), anonymous_namespace{EditMenus.cpp}::OnRedo(), anonymous_namespace{TrackMenus.cpp}::OnResample(), SelectActions::Handler::OnSelectAll(), SelectActions::Handler::OnSelectCursorEnd(), SelectActions::Handler::OnSelectStartCursor(), SelectActions::Handler::OnSelectSyncLockSel(), SelectActions::Handler::OnSelectTrackStartToEnd(), ScreenshotBigDialog::OnShortTracks(), anonymous_namespace{EditMenus.cpp}::OnSilence(), anonymous_namespace{LabelMenus.cpp}::OnSilenceLabels(), anonymous_namespace{EditMenus.cpp}::OnSplit(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), anonymous_namespace{LabelMenus.cpp}::OnSplitCutLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitDelete(), anonymous_namespace{LabelMenus.cpp}::OnSplitDeleteLabels(), anonymous_namespace{LabelMenus.cpp}::OnSplitLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitNew(), WaveTrackMenuTable::OnSwapChannels(), anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveBottom(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveDown(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveTop(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveUp(), anonymous_namespace{EditMenus.cpp}::OnTrim(), anonymous_namespace{EditMenus.cpp}::OnUndo(), anonymous_namespace{TrackView.cpp}::TrackPositioner::OnUpdate(), ProjectFileManager::OpenProjectFile(), TimeTrack::PasteInto(), anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag(), TranscriptionToolBar::PlayAtSpeed(), ProjectAudioManager::PlayPlayRegion(), TrackSelectHandle::Preview(), NyquistEffect::Process(), SpectralDataManager::ProcessTracks(), TrackPanel::ProcessUIHandleResult(), ProjectFileManager::ReadProjectFile(), RealtimeEffectPanel::RealtimeEffectPanel(), ProjectWindow::RedrawProject(), ButtonHandle::Release(), LabelTextHandle::Release(), NoteTrackButtonHandle::Release(), NoteTrackVZoomHandle::Release(), SpectrumVZoomHandle::Release(), WaveformVZoomHandle::Release(), TimeTrackVZoomHandle::Release(), AffordanceHandle::Release(), LabelDefaultClickHandle::RestoreState(), anonymous_namespace{Track.cpp}::TrackListRestorer::RestoreUndoRedoState(), ProjectManager::SafeToOpenProjectInto(), ProjectFileIO::SaveCopy(), LabelDefaultClickHandle::SaveState(), ProjectWindow::ScrollingLowerBoundTime(), anonymous_namespace{SelectMenus.cpp}::SeekWhenAudioInactive(), NoteTrackAffordanceHandle::SelectAt(), SelectUtilities::SelectNone(), GetInfoCommand::SendClips(), GetInfoCommand::SendEnvelopes(), GetInfoCommand::SendLabels(), GetInfoCommand::SendTracks(), TrackFocus::Set(), ScreenshotBigDialog::SizeTracks(), ProjectWindow::SkipEnd(), WaveTrackMenuTable::SplitStereo(), ProjectSelectionManager::SSBL_GetRate(), StereoRequiredFlag(), anonymous_namespace{Track.cpp}::TrackListRestorer::TrackListRestorer(), anonymous_namespace{TrackView.cpp}::TrackPositioner::TrackPositioner(), TracksExistFlag(), ProjectSettings::UpdatePrefs(), RealtimeEffectPanel::PrefsListenerHelper::UpdatePrefs(), WaveTracksExistFlag(), WaveTracksSelectedFlag(), ProjectFileIO::WriteXML(), ProjectWindow::ZoomAfterImport(), ZoomInAvailableFlag(), and ZoomOutAvailableFlag().
|
static |
Definition at line 492 of file Track.cpp.
References Get().
|
inlineprivate |
Definition at line 1684 of file Track.h.
References PackedArray::begin().
Referenced by ClearPendingTracks(), DoAddToHead(), and Permute().
|
inlineprivate |
Definition at line 1681 of file Track.h.
References PackedArray::end().
Referenced by DoAdd(), EmptyRange(), Remove(), and size().
double TrackList::GetEndTime | ( | ) | const |
Definition at line 1053 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), and Track::GetEndTime().
Referenced by SelectTimeCommand::Apply(), LOFImportFileHandle::doDurationAndScrollOffset(), ExportMultipleDialog::ExportMultipleByLabel(), and AdornedRulerPanel::StartQPPlay().
double TrackList::GetMinOffset | ( | ) | const |
Definition at line 1043 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), Track::GetOffset(), and min().
Return a track in the list that comes after Track t.
Definition at line 851 of file Track.cpp.
References getNext(), Track::GetNode(), Track::HasLinkedTrack(), and isNull().
Referenced by CanMoveDown(), and MoveDown().
|
inlineprivate |
|
inline |
Definition at line 1376 of file Track.h.
Referenced by EffectBase::FindProject(), and EffectBase::Preview().
|
inline |
Definition at line 870 of file Track.cpp.
References Track::GetLinkedTrack(), Track::GetNode(), getPrev(), Track::HasLinkedTrack(), and isNull().
Referenced by CanMoveUp(), and MoveUp().
|
inlineprivate |
double TrackList::GetStartTime | ( | ) | const |
Definition at line 1048 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), Track::GetStartTime(), and min().
Referenced by AdornedRulerPanel::StartQPPlay().
bool TrackList::HasPendingTracks | ( | ) | const |
Definition at line 1337 of file Track.cpp.
References begin(), end(), Track::GetId(), and mPendingUpdates.
Referenced by anonymous_namespace{Track.cpp}::TrackListRestorer::CanUndoOrRedo().
|
inlineprivate |
Definition at line 1678 of file Track.h.
References PackedArray::end().
Referenced by GetNext(), GetPrev(), RecalcPositions(), Remove(), and SwapNodes().
|
inline |
Definition at line 1474 of file Track.h.
References Track::IsLeader().
Referenced by ExportMultipleDialog::CountTracksAndLabels(), ExportMultipleDialog::ExportMultipleByTrack(), ScreenshotCommand::GetTrackRect(), TrackSelectHandle::Preview(), NyquistEffect::Process(), and MixerBoard::UpdateTrackClusters().
|
inline |
Definition at line 1481 of file Track.h.
References Track::IsLeader().
|
inline |
Definition at line 1606 of file Track.h.
Referenced by SelectHandle::AdjustSelection(), SelectionState::ChangeSelectionOnShiftClick(), ButtonHandle::Click(), BrushHandle::Click(), SelectHandle::Click(), ButtonHandle::Drag(), LabelTextHandle::Drag(), NoteTrackVZoomHandle::Drag(), SpectrumVZoomHandle::Drag(), WaveformVZoomHandle::Drag(), TimeTrackVZoomHandle::Drag(), BrushHandle::Drag(), SelectHandle::Drag(), SliderHandle::GetSlider(), TrackPanel::ProcessUIHandleResult(), ButtonHandle::Release(), LabelTextHandle::Release(), NoteTrackButtonHandle::Release(), NoteTrackVZoomHandle::Release(), SpectrumVZoomHandle::Release(), WaveformVZoomHandle::Release(), TimeTrackVZoomHandle::Release(), LabelDefaultClickHandle::RestoreState(), and NoteTrackAffordanceHandle::SelectAt().
bool TrackList::MakeMultiChannelTrack | ( | Track & | first, |
int | nChannels, | ||
bool | aligned | ||
) |
Converts channels to a multichannel track.
first | and the following must be in this list. Tracks should not be a part of another group (not linked) |
nChannels | number of channels, for now only 2 channels supported |
aligned | if true, the link type will be set to Track::LinkType::Aligned, or Track::LinkType::Group otherwise |
Definition at line 763 of file Track.cpp.
References Track::Aligned, end(), Track::Group, Track::LeftChannel, Track::mList, Track::RightChannel, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by ProjectAudioManager::DoRecord(), and EffectBase::Preview().
|
inlineprivate |
wxString TrackList::MakeUniqueTrackName | ( | const wxString & | baseTrackName | ) | const |
Returns string that contains baseTrackName, but is guaranteed to be unique among other tracks in that list.
baseTrackName | String to be put into the template |
Definition at line 544 of file Track.cpp.
Referenced by LabelTrack::Create(), and EffectBase::DoEffect().
bool TrackList::MoveDown | ( | Track * | t | ) |
Definition at line 992 of file Track.cpp.
References GetNext(), Track::GetNode(), and SwapNodes().
bool TrackList::MoveUp | ( | Track * | t | ) |
Definition at line 979 of file Track.cpp.
References Track::GetNode(), GetPrev(), and SwapNodes().
|
private |
Definition at line 614 of file Track.cpp.
References TrackListEvent::PERMUTED, and QueueEvent().
Referenced by Permute(), and SwapNodes().
void TrackList::Permute | ( | const std::vector< TrackNodePointer > & | permutation | ) |
For use in sorting: assume each iterator points into this list, no duplications.
Definition at line 675 of file Track.cpp.
References PackedArray::end(), getBegin(), PermutationEvent(), RecalcPositions(), and Track::SetOwner().
|
private |
Definition at line 588 of file Track.cpp.
References BasicUI::CallAfter().
Referenced by AdditionEvent(), DataEvent(), DeletionEvent(), EnsureVisibleEvent(), PermutationEvent(), ResizingEvent(), and SelectionEvent().
|
private |
Definition at line 565 of file Track.cpp.
References end(), Find(), Track::GetIndex(), getPrev(), isNull(), Track::SetIndex(), and UpdatePendingTracks().
Referenced by ApplyPendingTracks(), ClearPendingTracks(), DoAdd(), DoAddToHead(), Permute(), Remove(), and SwapNodes().
Definition at line 1059 of file Track.cpp.
References Track::Clone(), mPendingUpdates, mUpdaters, and updater.
Referenced by ProjectAudioManager::DoRecord().
void TrackList::RegisterPendingNewTrack | ( | const std::shared_ptr< Track > & | pTrack | ) |
Definition at line 1080 of file Track.cpp.
Referenced by ProjectAudioManager::DoRecord().
TrackNodePointer TrackList::Remove | ( | Track * | t | ) |
Remove the Track and return an iterator to what followed it.
Definition at line 799 of file Track.cpp.
References DeletionEvent(), getEnd(), getNext(), Track::GetNode(), isNull(), RecalcPositions(), and Track::SetOwner().
Referenced by EffectBase::DoEffect(), EffectBase::ReplaceProcessedTracks(), and AddedAnalysisTrack::~AddedAnalysisTrack().
auto TrackList::Replace | ( | Track * | t, |
const ListOfTracks::value_type & | with | ||
) |
Replace first track with second track, give back a holder Give the replacement the same id as the replaced
Definition at line 725 of file Track.cpp.
References Track::SetId(), and Track::SetOwner().
Referenced by ApplyPendingTracks(), ModifiedAnalysisTrack::ModifiedAnalysisTrack(), EffectBase::ReplaceProcessedTracks(), and ModifiedAnalysisTrack::~ModifiedAnalysisTrack().
|
private |
Definition at line 630 of file Track.cpp.
References QueueEvent(), and TrackListEvent::RESIZING.
|
inline |
Definition at line 1457 of file Track.h.
References Track::IsSelected().
Referenced by AnyTracksSelectedPred(), SelectionState::ChangeSelectionOnShiftClick(), EffectBase::CountWaveTracks(), EditableTracksSelectedPred(), anonymous_namespace{LabelMenus.cpp}::EditByLabel(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), TranscriptionToolBar::EnableDisableButtons(), ExportMultipleDialog::ExportMultipleByTrack(), EffectTruncSilence::FindSilences(), anonymous_namespace{EditMenus.cpp}::ForEachCopiedWaveTrack(), FrequencyPlotDialog::GetAudio(), GetPropertiesOfSelected(), anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel(), CompareAudioCommand::GetSelection(), EffectEqualization::Init(), NyquistEffect::Init(), EffectScienFilter::Init(), EffectCompressor::InitPass1(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), ContrastDialog::OnGetBackground(), ContrastDialog::OnGetForeground(), EffectBase::Preview(), EffectFindClipping::Process(), EffectNoiseReduction::Worker::Process(), EffectTruncSilence::ProcessAll(), StereoRequiredFlag(), and WaveTracksSelectedFlag().
|
inline |
Definition at line 1464 of file Track.h.
References Track::IsSelected().
|
inline |
Definition at line 1491 of file Track.h.
References Track::IsSelectedLeader().
Referenced by EffectBase::CountWaveTracks(), ContrastDialog::GetDB(), and TrackPanel::GetSelectedTrackCount().
|
inline |
Definition at line 1498 of file Track.h.
References Track::IsSelectedLeader().
|
private |
Definition at line 596 of file Track.cpp.
References QueueEvent(), and TrackListEvent::SELECTION_CHANGE.
|
inlinestatic |
Definition at line 1508 of file Track.h.
References TrackIterRange< TrackType >::EndingAfter(), and TrackIterRange< TrackType >::StartingWith().
Referenced by anonymous_namespace{ClipMenus.cpp}::FindClipBoundaries(), anonymous_namespace{ClipMenus.cpp}::FindClips(), EffectLoudness::Process(), and EffectNormalize::Process().
size_t TrackList::size | ( | ) | const |
Definition at line 1015 of file Track.cpp.
References empty(), getEnd(), and getPrev().
Referenced by ScreenshotCommand::Apply(), anonymous_namespace{EditMenus.cpp}::EstimateCopiedBlocks(), and ProjectSettings::UpdatePrefs().
void TrackList::Swap | ( | TrackList & | that | ) |
Definition at line 519 of file Track.cpp.
|
static |
If the given track is one of a pair of channels, swap them.
Definition at line 654 of file Track.cpp.
References Track::GetOwner(), Track::HasLinkedTrack(), Track::LeftChannel, Track::mpGroupData, Track::RightChannel, and Track::SetChannel().
Referenced by WaveTrackMenuTable::OnSwapChannels().
|
private |
Definition at line 920 of file Track.cpp.
References Channels(), FindLeader(), isNull(), PermutationEvent(), RecalcPositions(), Track::SetOwner(), and anonymous_namespace{NoteTrack.cpp}::swap().
Referenced by MoveDown(), and MoveUp().
|
inlineprivate |
Definition at line 1633 of file Track.h.
|
inlineprivate |
void TrackList::UnlinkChannels | ( | Track & | track | ) |
Removes linkage if track belongs to a group.
Definition at line 747 of file Track.cpp.
References Channels(), Track::mList, Track::None, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by WaveTrackMenuTable::SplitStereo().
void TrackList::UpdatePendingTracks | ( | ) |
Definition at line 1086 of file Track.cpp.
References FindById(), mPendingUpdates, mUpdaters, anonymous_namespace{LogWindow.cpp}::pUpdater, and updater.
Referenced by ApplyPendingTracks(), ProjectAudioManager::DoRecord(), TrackPanel::ProcessUIHandleResult(), and RecalcPositions().
|
private |
|
private |
Shadow tracks holding append-recording in progress; need to put them into a list so that GetLink() works.
Beware, they are in a disjoint iteration sequence from ordinary tracks
Definition at line 1778 of file Track.h.
Referenced by ApplyPendingTracks(), Clear(), ClearPendingTracks(), HasPendingTracks(), RegisterPendingChangedTrack(), and UpdatePendingTracks().
|
private |
This is in correspondence with mPendingUpdates.
Definition at line 1780 of file Track.h.
Referenced by Clear(), ClearPendingTracks(), RegisterPendingChangedTrack(), and UpdatePendingTracks().
|
staticprivate |
Definition at line 1726 of file Track.h.
Referenced by ApplyPendingTracks(), DoAdd(), and DoAddToHead().