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 | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | Updater = std::function< void(Track &dest, const Track &src)> |
Public Types inherited from Observer::Publisher< TrackListEvent > | |
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 |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
TrackIter< Track > | DoFind (Track *pTrack) |
TrackIter< Track > | Find (Track *pTrack) |
TrackIter< const Track > | Find (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 > > |
void | Insert (const Track *before, TrackList &&trackList) |
Inserts tracks form trackList starting from position where before is located. If before is nullptr tracks are appended. More... | |
void | Permute (const std::vector< Track * > &tracks) |
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) |
std::vector< Track * > | UnlinkChannels (Track &track) |
Removes linkage if track belongs to a group. More... | |
bool | MakeMultiChannelTrack (Track &first, int nChannels) |
Converts channels to a multichannel track. More... | |
TrackListHolder | ReplaceOne (Track &t, TrackList &&with) |
void | Remove (Track &track) |
Remove a channel group, given the leader. 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) |
template<typename Subclass > | |
std::shared_ptr< Subclass > | Lock (const std::weak_ptr< Subclass > &wTrack) |
bool | empty () const |
size_t | NChannels () const |
size_t | Size () const |
double | GetStartTime () const |
Return the least start time of the tracks, or 0 when no tracks. More... | |
double | GetEndTime () const |
Return the greatest end time of the tracks, or 0 when no tracks. More... | |
void | Append (TrackList &&list) |
Remove all tracks from list and put them at the end of this More... | |
void | RegisterPendingNewTracks (TrackList &&list) |
void | AppendOne (TrackList &&list) |
Track * | RegisterPendingChangedTrack (Updater updater, Track *src) |
void | UpdatePendingTracks () |
void | ClearPendingTracks (ListOfTracks *pAdded=nullptr) |
bool | ApplyPendingTracks () |
bool | HasPendingTracks () const |
Public Member Functions inherited from Observer::Publisher< TrackListEvent > | |
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... | |
Public Member Functions inherited from ClientData::Base | |
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 TrackListHolder | Create (AudacityProject *pOwner) |
template<typename TrackType > | |
static auto | SingletonRange (TrackType *pTrack) -> TrackIterRange< TrackType > |
template<typename TrackType > | |
static auto | Channels (TrackType *pTrack) -> TrackIterRange< TrackType > |
static size_t | NChannels (const Track &track) |
Count channels of a track. More... | |
static Track * | SwapChannels (Track &track) |
static TrackListHolder | Temporary (AudacityProject *pProject, const Track::Holder &left={}, const Track::Holder &right={}) |
static TrackListHolder | Temporary (AudacityProject *pProject, const std::vector< Track::Holder > &channels) |
template<typename T > | |
static TrackListHolder | Temporary (AudacityProject *pProject, const std::vector< std::shared_ptr< T > > &channels) |
Private Member Functions | |
TrackList (const TrackList &that)=delete | |
TrackList & | operator= (const TrackList &)=delete |
TrackList (TrackList &&that)=delete | |
TrackList & | operator= (TrackList &&)=delete |
void | clear ()=delete |
iterator | Begin () |
This private function still iterates channels not tracks. More... | |
iterator | End () |
This private function still iterates channels not tracks. More... | |
const_iterator | Begin () const |
This private function still iterates channels not tracks. More... | |
const_iterator | End () const |
This private function still iterates channels not tracks. More... | |
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 (Track &track) |
void | PermutationEvent (TrackNodePointer node) |
void | DataEvent (const std::shared_ptr< Track > &pTrack, bool allChannels, int code) |
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 |
std::shared_ptr< TrackList > | mPendingUpdates |
std::vector< Updater > | mUpdaters |
This is in correspondence with leader tracks in mPendingUpdates. More... | |
bool | mAssignsIds { true } |
Static Private Attributes | |
static long | sCounter = -1 |
Friends | |
class | Track |
Additional Inherited Members | |
Static Public Attributes inherited from Observer::Publisher< TrackListEvent > | |
static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< TrackListEvent > | |
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::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using TrackList::iterator = TrackIter<Track> |
using TrackList::reverse_iterator = std::reverse_iterator<iterator> |
using TrackList::Updater = std::function<void(Track &dest, const Track &src)> |
using TrackList::value_type = Track * |
|
privatedelete |
|
privatedelete |
|
explicit |
Definition at line 357 of file Track.cpp.
References mOwner, mPendingUpdates, and Temporary().
|
virtual |
|
inline |
Definition at line 1201 of file Track.h.
Referenced by Append(), AppendOne(), ApplyPendingTracks(), LabelTrack::Create(), AUPImportFileHandle::HandleLabelTrack(), AUPImportFileHandle::HandleNoteTrack(), AUPImportFileHandle::HandleTimeTrack(), AUPImportFileHandle::HandleWaveTrack(), NoteTrack::PasteInto(), TimeTrack::PasteInto(), WaveTrack::PasteInto(), LabelTrack::PasteInto(), RegisterPendingNewTracks(), and LabelDialog::TransferDataFromWindow().
|
private |
Definition at line 491 of file Track.cpp.
References TrackListEvent::ADDITION, and QueueEvent().
Referenced by ApplyPendingTracks(), DoAdd(), DoAddToHead(), and ReplaceOne().
|
inline |
Add a Track, giving it a fresh id.
Definition at line 1197 of file Track.h.
|
inline |
Definition at line 1097 of file Track.h.
References Track::IsLeader().
Referenced by anonymous_namespace{Track.cpp}::Accumulate(), cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::CalculateChannels(), WaveTrack::ClearAndPaste(), LabelDefaultClickHandle::Click(), anonymous_namespace{EditMenus.cpp}::CutCopyAvailableFlag(), LabelTrackView::DoKeyDown(), TimeShiftHandle::DoSlideVertical(), TrackPanel::DrawTracks(), EffectOutputTracks::EffectOutputTracks(), ControlToolBar::EnableDisableButtons(), TranscriptionToolBar::EnableDisableButtons(), anonymous_namespace{EditMenus.cpp}::EstimateCopiedBlocks(), anonymous_namespace{EditMenus.cpp}::EstimateCopyBytesCount(), LabelDialog::FindAllLabels(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), anonymous_namespace{EditMenus.cpp}::FindCorrespondence(), ImportUtils::ForEachChannel(), EffectSilence::GenerateTrack(), GetAllSeqBlocks(), anonymous_namespace{EditMenus.cpp}::HasHiddenData(), MixerBoard::HasSolo(), ProjectFileManager::Import(), VampEffect::Init(), MakeTransportTracks(), anonymous_namespace{ExportMIDI.cpp}::NoteTracksExistFlag(), ExportFilePanel::OnChannelsConfigure(), ExportAudioDialog::OnExport(), TranscriptionToolBar::PlayAtSpeed(), TrackSelectHandle::Preview(), EffectFindClipping::Process(), NyquistEffect::Process(), NyquistEffect::ProcessOne(), PerTrackEffect::ProcessPass(), RealtimeEffectPanel::RealtimeEffectPanel(), TracksExistFlag(), LabelDialog::TransferDataFromWindow(), ExportFilePanel::UpdateMaxChannels(), MixerBoard::UpdateTrackClusters(), TrackPanel::UpdateVRulerSize(), WaveTracksExistFlag(), ZoomInAvailableFlag(), and ZoomOutAvailableFlag().
|
inline |
Definition at line 1104 of file Track.h.
References Track::IsLeader().
void TrackList::Append | ( | TrackList && | list | ) |
Remove all tracks from list
and put them at the end of this
Definition at line 1449 of file Track.cpp.
Referenced by Insert(), and anonymous_namespace{Track.cpp}::TrackListRestorer::TrackListRestorer().
void TrackList::AppendOne | ( | TrackList && | list | ) |
Remove first channel group (if any) from list
and put it at the end of this
Definition at line 1470 of file Track.cpp.
References Add(), end(), and NChannels().
Referenced by EffectOutputTracks::Commit().
bool TrackList::ApplyPendingTracks | ( | ) |
Definition at line 1092 of file Track.cpp.
References Add(), AdditionEvent(), PackedArray::begin(), ClearPendingTracks(), FindById(), mPendingUpdates, RecalcPositions(), ReplaceOne(), sCounter, Temporary(), and UpdatePendingTracks().
Referenced by ProjectAudioManager::OnCommitRecording().
|
inline |
Definition at line 1050 of file Track.h.
Referenced by Track::Paste().
|
inlineprivate |
This private function still iterates channels not tracks.
Definition at line 1086 of file Track.h.
Referenced by empty(), and HasPendingTracks().
|
inline |
|
inlineprivate |
bool TrackList::CanMoveDown | ( | Track * | t | ) | const |
Definition at line 861 of file Track.cpp.
References GetNext().
bool TrackList::CanMoveUp | ( | Track * | t | ) | const |
|
inline |
Definition at line 1054 of file Track.h.
References PackedArray::begin().
|
inline |
Definition at line 1055 of file Track.h.
References PackedArray::end().
|
inlinestatic |
Definition at line 1164 of file Track.h.
Referenced by anonymous_namespace{WaveChannelView.cpp}::AnyAffordance(), WaveTrack::Append(), WaveTrack::Clear(), WaveTrack::ClearAndAddCutLine(), WaveTrack::ClearAndPasteAtSameTempo(), WaveTrack::Clone(), WaveTrack::CloseLock(), WaveTrack::ConvertToSampleFormat(), WaveTrack::Copy(), WaveTrack::CopyClipEnvelopes(), WaveTrack::CountBlocks(), WaveTrack::CreateWideClip(), DataEvent(), WaveTrack::DiscardTrimmed(), WaveChannelSubView::DoDetailedHitTest(), WaveTrack::DoGet(), WaveTrack::DoGetChannel(), WaveTrack::DoOnProjectTempoChange(), TrackPanelResizerCell::Draw(), Track::Duplicate(), WaveTrack::ExpandCutLine(), anonymous_namespace{PendingTracks.cpp}::finder(), WaveTrack::Flush(), WaveTrack::FormatConsistencyCheck(), ChannelView::GetChannelGroupHeight(), WaveTrack::GetClipInterfaces(), WaveTrack::GetEnvelopeAtTime(), WaveTrack::GetEnvelopeValues(), WaveTrack::GetErrorOpening(), CommonChannelView::GetMinimizedHeight(), WaveTrack::GetSequenceSamplesCount(), TrackPanelResizeHandle::GetTrack(), WaveTrack::HasHiddenData(), WaveTrack::HasTrivialEnvelope(), WaveTrack::InsertInterval(), WaveTrack::InsertSilence(), WaveTrack::Join(), WaveTrack::LinkConsistencyFix(), WaveTrack::MergeClips(), WaveTrack::MoveTo(), WaveTrack::PasteInto(), WaveTrack::PasteWaveTrackAtSameTempo(), Permute(), WaveTrack::RateConsistencyCheck(), RegisterPendingChangedTrack(), WaveTrack::Reinit(), WaveTrack::RemoveCutLine(), WaveTrack::RemoveInterval(), ReplaceOne(), WaveTrack::Resample(), WaveTrack::Reverse(), SelectionEvent(), ChannelView::SetMinimized(), WaveTrack::SetWaveColorIndex(), WaveTrack::Silence(), WaveTrack::Split(), WaveTrack::SplitDelete(), WaveTrack::SyncLockAdjust(), WaveTrack::Trim(), UnlinkChannels(), TrackPanel::UpdateVRuler(), VisitBlocks(), WaveTrack::WideEmptyCopy(), WaveTrack::WidestEffectiveFormat(), and WaveTrack::WriteXML().
|
inlinestaticprivate |
Definition at line 1142 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 772 of file Track.cpp.
References DeletionEvent(), mPendingUpdates, mUpdaters, and Temporary().
Referenced by ~TrackList().
void TrackList::ClearPendingTracks | ( | ListOfTracks * | pAdded = nullptr | ) |
Definition at line 1050 of file Track.cpp.
References PackedArray::begin(), DeletionEvent(), empty(), PackedArray::end(), getBegin(), GetOwner(), mPendingUpdates, mUpdaters, and RecalcPositions().
Referenced by ApplyPendingTracks(), ProjectAudioManager::CancelRecording(), and AudacityApp::OnExceptionInMainLoop().
|
inline |
|
static |
Definition at line 365 of file Track.cpp.
Referenced by WaveTrack::Copy(), ProjectFileManager::DoSave(), anonymous_namespace{EditMenus.cpp}::DuplicateDiscardTrimmed(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), EffectOutputTracks::EffectOutputTracks(), EffectPreview(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{EditMenus.cpp}::OnCut(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), EffectTwoPassSimpleMono::Process(), EffectManager::PromptUser(), ProjectFileManager::ReadProjectFile(), ProjectFileIO::SaveProject(), and Temporary().
|
inline |
|
private |
Definition at line 467 of file Track.cpp.
References Channels(), QueueEvent(), and TrackListEvent::TRACK_DATA_CHANGE.
|
private |
Definition at line 485 of file Track.cpp.
References TrackListEvent::DELETION, and QueueEvent().
Referenced by Clear(), ClearPendingTracks(), Remove(), and ReplaceOne().
Definition at line 611 of file Track.cpp.
References AdditionEvent(), getEnd(), getPrev(), mAssignsIds, ChannelGroup::None, RecalcPositions(), and sCounter.
Definition at line 599 of file Track.cpp.
References AdditionEvent(), getBegin(), RecalcPositions(), sCounter, Track::SetId(), and Track::SetOwner().
auto TrackList::DoFind | ( | Track * | pTrack | ) |
Turn a pointer into a TrackIter (constant time); get end iterator if this does not own the track
Definition at line 511 of file Track.cpp.
Referenced by RecalcPositions().
bool TrackList::empty | ( | ) | const |
Definition at line 955 of file Track.cpp.
References Begin(), and End().
Referenced by anonymous_namespace{Track.cpp}::Accumulate(), ImportCommand::Apply(), ClearPendingTracks(), ProjectFileManager::Import(), NChannels(), ApplyMacroDialog::OnApplyToFiles(), and anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord().
|
private |
Definition at line 501 of file Track.cpp.
References Track::Any(), and getEnd().
|
inline |
Definition at line 1051 of file Track.h.
Referenced by Append(), AppendOne(), FindUndoTracks(), MakeMultiChannelTrack(), RegisterPendingChangedTrack(), and ReplaceOne().
|
inlineprivate |
This private function still iterates channels not tracks.
Definition at line 1088 of file Track.h.
Referenced by empty(), HasPendingTracks(), MakeMultiChannelTrack(), and RecalcPositions().
|
inline |
|
inlineprivate |
|
inlineprivate |
Definition at line 1077 of file Track.h.
References ActiveProjects::Find().
auto TrackList::Find | ( | Track * | pTrack | ) |
Definition at line 519 of file Track.cpp.
References Track::IsLeader().
Referenced by SpectrumView::DoDraw(), WaveformView::DoDraw(), TimeShiftHandle::DoSlideVertical(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), TrackPanel::FindTrackRect(), Insert(), anonymous_namespace{ChannelView.cpp}::TrackPositioner::OnUpdate(), ProjectTempoListener::ProjectTempoListener(), TrackPanel::RefreshTrack(), TrackFocus::Set(), and SwapNodes().
Definition at line 588 of file Track.cpp.
References PackedArray::begin(), and PackedArray::end().
Referenced by ApplyPendingTracks(), and UpdatePendingTracks().
|
static |
Definition at line 1406 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 347 of file Track.cpp.
Referenced by SelectUtilities::ActivatePlayRegion(), ProjectFileManager::AddImportedTracks(), SelectHandle::AdjustSelection(), AdornedRulerPanel::AdornedRulerPanel(), AnyTracksSelectedPred(), AppendItem(), SetTrackBase::Apply(), ImportCommand::Apply(), SelectTimeCommand::Apply(), SelectTracksCommand::Apply(), SetClipCommand::Apply(), SetLabelCommand::Apply(), BrushHandleHitTest(), TrackSelectHandle::CalculateRearrangingThresholds(), TrackPanelResizeHandle::Cancel(), ProjectAudioManager::CancelRecording(), anonymous_namespace{Track.cpp}::TrackListRestorer::CanUndoOrRedo(), ProjectAudioManager::ChooseExistingRecordingTracks(), ButtonHandle::Click(), TrackPanelResizeHandle::Click(), LabelDefaultClickHandle::Click(), LabelGlyphHandle::Click(), BrushHandle::Click(), SelectHandle::Click(), TimeShiftHandle::Click(), BackgroundHandle::Click(), Viewport::CollapseAllTracks(), anonymous_namespace{EditMenus.cpp}::CutCopyAvailableFlag(), 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(), ExportAudioDialog::DoExportSplitByTracks(), anonymous_namespace{ImportMIDI.cpp}::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(), 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(), TimerRecordDialog::ExecutePostRecordActions(), Viewport::ExpandAllTracks(), GetInfoCommand::ExploreTrackPanel(), ExportAudioDialog::ExportAudioDialog(), cloud::audiocom::ShareAudioDialog::ExportProject(), anonymous_namespace{ClipMenus.cpp}::FindClipBoundaries(), anonymous_namespace{ClipMenus.cpp}::FindClips(), anonymous_namespace{EditMenus.cpp}::FindSourceTracks(), TrackFocus::FindTrack(), SpectrumView::ForAll(), ProjectFileIO::GenerateDoc(), Get(), GetAllSeqBlocks(), FrequencyPlotDialog::GetAudio(), ContrastDialog::GetDB(), GetPropertiesOfSelected(), CompareAudioCommand::GetSelection(), SliderHandle::GetSlider(), TrackFocus::GetTracks(), Viewport::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(), ExportFilePanel::Init(), CLExportProcessor::Initialize(), FLACExportProcessor::Initialize(), FFmpegExportProcessor::Initialize(), MP2ExportProcessor::Initialize(), MP3ExportProcessor::Initialize(), OGGExportProcessor::Initialize(), OpusExportProcessor::Initialize(), PCMExportProcessor::Initialize(), WavPackExportProcessor::Initialize(), anonymous_namespace{EditMenus.cpp}::JoinClipsAvailableFlag(), 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(), NoteTrack::New(), TimeTrack::New(), WaveTrack::New(), LabelTrack::New(), anonymous_namespace{ExportMIDI.cpp}::NoteTracksExistFlag(), anonymous_namespace{EditMenus.cpp}::NotificationScope(), ApplyMacroDialog::OnApplyToFiles(), ExportFilePanel::OnChannelsConfigure(), ProjectManager::OnCloseWindow(), 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(), ExportAudioDialog::OnExport(), 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(), 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(), 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(), 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{ChannelView.cpp}::TrackPositioner::OnUpdate(), SelectActions::Handler::OnZeroCrossing(), ProjectFileManager::OpenProjectFile(), TimeTrack::PasteInto(), anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag(), TranscriptionToolBar::PlayAtSpeed(), ProjectAudioManager::PlayPlayRegion(), TrackSelectHandle::Preview(), NyquistEffect::Process(), EffectTwoPassSimpleMono::Process(), SpectralDataManager::ProcessTracks(), TrackPanel::ProcessUIHandleResult(), WaveTrack::ProjectNyquistFrequency(), ProjectFileManager::ReadProjectFile(), RealtimeEffectPanel::RealtimeEffectPanel(), ButtonHandle::Release(), LabelTextHandle::Release(), NoteTrackButtonHandle::Release(), NoteTrackVZoomHandle::Release(), SpectrumVZoomHandle::Release(), WaveformVZoomHandle::Release(), TimeTrackVZoomHandle::Release(), LabelDefaultClickHandle::RestoreState(), anonymous_namespace{Track.cpp}::TrackListRestorer::RestoreUndoRedoState(), ProjectManager::SafeToOpenProjectInto(), ProjectFileIO::SaveCopy(), LabelDefaultClickHandle::SaveState(), Viewport::ScrollToBottom(), Viewport::ScrollToEnd(), anonymous_namespace{SelectMenus.cpp}::SeekWhenAudioInactive(), NoteTrackAffordanceHandle::SelectAt(), SelectUtilities::SelectNone(), GetInfoCommand::SendClips(), GetInfoCommand::SendEnvelopes(), GetInfoCommand::SendLabels(), GetInfoCommand::SendTracks(), TrackFocus::Set(), Viewport::ShowTrack(), WaveTrackMenuTable::SplitStereo(), StereoRequiredFlag(), anonymous_namespace{Track.cpp}::TrackListRestorer::TrackListRestorer(), anonymous_namespace{ChannelView.cpp}::TrackPositioner::TrackPositioner(), TracksExistFlag(), ExportAudioDialog::UpdateLabelExportSettings(), ExportFilePanel::UpdateMaxChannels(), ProjectSettings::UpdatePrefs(), RealtimeEffectPanel::PrefsListenerHelper::UpdatePrefs(), Viewport::UpdateScrollbarsForTracks(), ExportAudioDialog::UpdateTrackExportSettings(), HighlitClipButtonHandle::UpdateTrackSelection(), AffordanceHandle::UpdateTrackSelection(), WaveTracksExistFlag(), WaveTracksSelectedFlag(), ProjectFileIO::WriteXML(), Viewport::ZoomFitHorizontally(), Viewport::ZoomFitHorizontallyAndShowTrack(), Viewport::ZoomFitVertically(), ZoomInAvailableFlag(), and ZoomOutAvailableFlag().
|
static |
Definition at line 352 of file Track.cpp.
References Get(), and project.
|
inlineprivate |
Definition at line 1376 of file Track.h.
References PackedArray::begin().
Referenced by ClearPendingTracks(), DoAddToHead(), and Permute().
|
inlineprivate |
Definition at line 1373 of file Track.h.
References PackedArray::end().
Referenced by DoAdd(), EmptyRange(), NChannels(), and Remove().
double TrackList::GetEndTime | ( | ) | const |
Return the greatest end time of the tracks, or 0 when no tracks.
Definition at line 991 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), and ChannelGroup::GetEndTime().
Referenced by SelectTimeCommand::Apply(), LOFImportFileHandle::doDurationAndScrollOffset(), ExportAudioDialog::OnExport(), and AdornedRulerPanel::StartQPPlay().
Return a track in the list that comes after Track t.
Definition at line 801 of file Track.cpp.
References getNext(), Track::GetNode(), Track::HasLinkedTrack(), and isNull().
Referenced by CanMoveDown(), and MoveDown().
|
inlineprivate |
Move an iterator to the next node, if any; else stay at end.
Definition at line 1381 of file Track.h.
Referenced by Track::GetLinkedTrack(), GetNext(), and Remove().
|
inline |
Definition at line 1032 of file Track.h.
Referenced by ClearPendingTracks(), EffectOutputTracks::EffectOutputTracks(), EffectBase::FindProject(), EffectStereoToMono::ProcessOne(), and RegisterPendingChangedTrack().
|
inline |
Definition at line 820 of file Track.cpp.
References Track::GetLinkedTrack(), Track::GetNode(), getPrev(), Track::HasLinkedTrack(), and isNull().
Referenced by CanMoveUp(), and MoveUp().
|
inlineprivate |
Move an iterator to the previous node, if any; else wrap to end.
Definition at line 1391 of file Track.h.
Referenced by DoAdd(), GetPrev(), NChannels(), and RecalcPositions().
double TrackList::GetStartTime | ( | ) | const |
Return the least start time of the tracks, or 0 when no tracks.
Definition at line 985 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), ChannelGroup::GetStartTime(), and min().
Referenced by AdornedRulerPanel::StartQPPlay().
bool TrackList::HasPendingTracks | ( | ) | const |
Definition at line 1269 of file Track.cpp.
References Begin(), End(), Track::GetId(), and mPendingUpdates.
Referenced by anonymous_namespace{Track.cpp}::TrackListRestorer::CanUndoOrRedo().
Inserts tracks form trackList
starting from position where before
is located. If before
is nullptr tracks are appended.
before == nullptr || (before->IsLeader() && Find(before) != EndIterator<const Track>())
Definition at line 546 of file Track.cpp.
References Append(), Find(), Track::IsLeader(), Permute(), and Size().
|
inlineprivate |
Definition at line 1369 of file Track.h.
References PackedArray::end().
Referenced by GetNext(), GetPrev(), RecalcPositions(), Remove(), and SwapNodes().
|
inline |
Definition at line 1246 of file Track.h.
Referenced by SelectHandle::AdjustSelection(), ButtonHandle::Click(), BrushHandle::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 | ||
) |
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 |
Definition at line 705 of file Track.cpp.
References ChannelGroup::Aligned, end(), End(), Track::mList, and THROW_INCONSISTENCY_EXCEPTION.
|
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 411 of file Track.cpp.
References name.
Referenced by LabelTrack::Create().
bool TrackList::MoveDown | ( | Track * | t | ) |
Definition at line 942 of file Track.cpp.
References GetNext(), Track::GetNode(), and SwapNodes().
bool TrackList::MoveUp | ( | Track * | t | ) |
Definition at line 929 of file Track.cpp.
References Track::GetNode(), GetPrev(), and SwapNodes().
size_t TrackList::NChannels | ( | ) | const |
Definition at line 960 of file Track.cpp.
References empty(), getEnd(), and getPrev().
Referenced by AppendItem(), AppendOne(), anonymous_namespace{EditMenus.cpp}::FitsInto(), WaveTrack::GetChannelType(), CompareAudioCommand::GetSelection(), ExportFilePanel::Init(), MixAndRender(), WaveTrack::NChannels(), EffectNormalize::Process(), Remove(), GetInfoCommand::SendTracks(), anonymous_namespace{WaveTrackControls.cpp}::Status1DrawFunction(), and SwapNodes().
|
inlinestatic |
Count channels of a track.
Definition at line 1171 of file Track.h.
References ChannelGroup::Channels().
|
private |
Definition at line 480 of file Track.cpp.
References TrackListEvent::PERMUTED, and QueueEvent().
Referenced by Permute(), and SwapNodes().
void TrackList::Permute | ( | const std::vector< Track * > & | tracks | ) |
tracks
contains pointers only to leader tracks of this, and each of them exactly once Definition at line 570 of file Track.cpp.
References Channels(), PackedArray::end(), getBegin(), PermutationEvent(), RecalcPositions(), Track::SetOwner(), and tracks.
Referenced by Insert().
|
private |
Definition at line 452 of file Track.cpp.
References BasicUI::CallAfter().
Referenced by AdditionEvent(), DataEvent(), DeletionEvent(), PermutationEvent(), ResizingEvent(), and SelectionEvent().
|
inline |
Definition at line 1060 of file Track.h.
Referenced by ChannelView::GetTotalHeight().
|
inline |
|
private |
Definition at line 429 of file Track.cpp.
References DoFind(), End(), Track::GetIndex(), getPrev(), isNull(), Track::SetIndex(), and UpdatePendingTracks().
Referenced by ApplyPendingTracks(), ClearPendingTracks(), DoAdd(), DoAddToHead(), Permute(), Remove(), ReplaceOne(), and SwapNodes().
GetOwner()
src->IsLeader()
src->NChannels() == result.size()
Definition at line 998 of file Track.cpp.
References Channels(), Track::Clone(), end(), GetOwner(), Track::IsLeader(), mPendingUpdates, mUpdaters, ChannelGroup::NChannels(), tracks, and updater.
void TrackList::RegisterPendingNewTracks | ( | TrackList && | list | ) |
void TrackList::Remove | ( | Track & | track | ) |
Remove a channel group, given the leader.
track.IsLeader()
Definition at line 745 of file Track.cpp.
References DeletionEvent(), getEnd(), getNext(), Track::IsLeader(), isNull(), NChannels(), and RecalcPositions().
Referenced by EffectOutputTracks::Commit(), and EffectStereoToMono::ProcessOne().
|
inline |
|
inline |
TrackListHolder TrackList::ReplaceOne | ( | Track & | t, |
TrackList && | with | ||
) |
Replace channel group t
with the first group in the given list, return a temporary list of the removed tracks, modify given list by removing group
Replacements may have fewer channels Give the replacements the same ids as the replaced
t.IsLeader()
t.GetOwner().get() == this
t.NChannels() >= (*with.begin())->NChannels()
Move one channel to the temporary list
Be sure it preserves leader-ness
Redirect the list element of this
Definition at line 637 of file Track.cpp.
References AdditionEvent(), Channels(), DeletionEvent(), end(), Track::GetOwner(), Track::IsLeader(), ChannelGroup::NChannels(), RecalcPositions(), and Temporary().
Referenced by ApplyPendingTracks(), and EffectOutputTracks::Commit().
|
private |
Definition at line 496 of file Track.cpp.
References QueueEvent(), and TrackListEvent::RESIZING.
|
inline |
Definition at line 1114 of file Track.h.
References Track::IsSelectedLeader().
Referenced by EffectLoudness::AllocBuffers(), AnyTracksSelectedPred(), EditableTracksSelectedPred(), TranscriptionToolBar::EnableDisableButtons(), anonymous_namespace{EditMenus.cpp}::FindCorrespondence(), FrequencyPlotDialog::GetAudio(), ContrastDialog::GetDB(), GetPropertiesOfSelected(), TrackPanel::GetSelectedTrackCount(), CompareAudioCommand::GetSelection(), EffectAmplify::Init(), EffectEqualization::Init(), NyquistEffect::Init(), EffectScienFilter::Init(), EffectCompressor::InitPass1(), anonymous_namespace{EditMenus.cpp}::JoinClipsAvailableFlag(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), LabelTracksExistFlag(), ContrastDialog::OnGetBackground(), ContrastDialog::OnGetForeground(), ProjectAudioManager::OnRecord(), StereoRequiredFlag(), and WaveTracksSelectedFlag().
|
inline |
Definition at line 1120 of file Track.h.
References Track::IsSelectedLeader().
|
private |
Definition at line 460 of file Track.cpp.
References Channels(), QueueEvent(), and TrackListEvent::SELECTION_CHANGE.
|
inlinestatic |
Definition at line 1128 of file Track.h.
References TrackIterRange< TrackType >::EndingAfter(), and TrackIterRange< TrackType >::StartingWith().
Referenced by EffectTruncSilence::ProcessIndependently(), and SelectionState::SelectTrackLength().
|
inline |
Definition at line 1259 of file Track.h.
References Track::Any().
Referenced by Insert().
void TrackList::Swap | ( | TrackList & | that | ) |
!GetOwner() && !that.GetOwner()
Definition at line 381 of file Track.cpp.
If the given track is one of a pair of channels, swap them
Definition at line 527 of file Track.cpp.
References ChannelGroup::DetachGroupData(), Track::GetOwner(), and Track::HasLinkedTrack().
Referenced by WaveTrackMenuTable::OnSwapChannels().
|
private |
Definition at line 870 of file Track.cpp.
References Find(), isNull(), NChannels(), PermutationEvent(), RecalcPositions(), Track::SetOwner(), and anonymous_namespace{NoteTrack.cpp}::swap().
Referenced by MoveDown(), and MoveUp().
|
inlinestatic |
Construct a temporary list whose first channel group contains the given channels, up to the limit of channel group size; excess channels go each into a separate group Overload allowing shared pointers to some subclass of Track
Definition at line 1287 of file Track.h.
|
static |
Construct a temporary list whose first channel group contains the given channels, up to the limit of channel group size; excess channels go each into a separate group
Definition at line 1436 of file Track.cpp.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, and Temporary().
|
static |
Construct a temporary list owned by pProject
(if that is not null) so that TrackList::Channels(left.get())
will enumerate the given tracks
left == nullptr || left->GetOwner() == nullptr
right == nullptr || (left && right->GetOwner() == nullptr)
Definition at line 1418 of file Track.cpp.
References Create().
Referenced by ApplyPendingTracks(), Clear(), NoteTrack::Clone(), TimeTrack::Clone(), WaveTrack::Clone(), LabelTrack::Clone(), TimeTrack::Copy(), NoteTrack::Copy(), LabelTrack::Copy(), WaveTrackFactory::Create(), NoteTrack::Cut(), anonymous_namespace{ImportMIDI.cpp}::MIDIImportFileHandle::Import(), BenchmarkDialog::OnRun(), EffectStereoToMono::ProcessOne(), PerTrackEffect::ProcessPass(), ReplaceOne(), WaveTrack::SyncLockAdjust(), Temporary(), TrackList(), and WaveTrack::WideEmptyCopy().
|
inlineprivate |
Definition at line 1324 of file Track.h.
|
inlineprivate |
Removes linkage if track belongs to a group.
Definition at line 691 of file Track.cpp.
References Channels(), Track::mList, ChannelGroup::None, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by EffectStereoToMono::ProcessOne(), and WaveTrackMenuTable::SplitStereo().
void TrackList::UpdatePendingTracks | ( | ) |
Definition at line 1030 of file Track.cpp.
References FindById(), mPendingUpdates, mUpdaters, anonymous_namespace{LogWindow.cpp}::pUpdater, and updater.
Referenced by ApplyPendingTracks(), TrackPanel::ProcessUIHandleResult(), and RecalcPositions().
|
private |
|
private |
Definition at line 1467 of file Track.h.
Referenced by TrackList().
|
private |
Shadow tracks holding append-recording in progress; need to put them into a list so that channel grouping works
Beware, they are in a disjoint iteration sequence from ordinary tracks
Definition at line 1472 of file Track.h.
Referenced by ApplyPendingTracks(), Clear(), ClearPendingTracks(), HasPendingTracks(), RegisterPendingChangedTrack(), TrackList(), and UpdatePendingTracks().
|
private |
This is in correspondence with leader tracks in mPendingUpdates.
Definition at line 1474 of file Track.h.
Referenced by Clear(), ClearPendingTracks(), RegisterPendingChangedTrack(), and UpdatePendingTracks().
|
staticprivate |
Definition at line 1417 of file Track.h.
Referenced by ApplyPendingTracks(), DoAdd(), and DoAddToHead().