![]() |
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 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 (TrackNodePointer node={}) |
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 1562 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(), and LabelDialog::TransferDataFromWindow().
|
private |
Definition at line 628 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 1558 of file Track.h.
|
inline |
Definition at line 1435 of file Track.h.
Referenced by anonymous_namespace{Track.cpp}::Accumulate(), ImportCommand::Apply(), LabelDefaultClickHandle::Click(), Effect::CopyInputTracks(), ExportMultipleDialog::CountTracksAndLabels(), ExportPlugin::CreateMixer(), 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(), ProjectAudioManager::GetAllPlaybackTracks(), GetAllSeqBlocks(), GetNumExportChannels(), TrackView::GetTotalHeight(), MixerBoard::HasSolo(), ClipMoveState::Init(), LabelTracksExistFlag(), MakeUniqueTrackName(), anonymous_namespace{FileMenus.cpp}::NoteTracksExistFlag(), AudacityPrintout::OnPrintPage(), ProjectAudioManager::OnRecord(), LabelDialog::OnSelectCell(), ScreenshotBigDialog::OnShortTracks(), TransportActions::Handler::OnTimerRecord(), TranscriptionToolBar::PlayAtSpeed(), ProjectHistory::PopState(), EffectBase::Preview(), EffectFindClipping::Process(), SelectionStateChanger::SelectionStateChanger(), SelectionState::SelectNone(), SelectionState::SelectRangeOfTracks(), TracksExistFlag(), LabelDialog::TransferDataFromWindow(), TrackPanel::UpdateVRulerSize(), VisitBlocks(), WaveTracksExistFlag(), ZoomInAvailableFlag(), ZoomOutAvailableFlag(), and SelectionStateChanger::~SelectionStateChanger().
|
inline |
bool TrackList::ApplyPendingTracks | ( | ) |
Definition at line 1140 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 1388 of file Track.h.
Referenced by TimeShiftHandle::DoSlideVertical(), empty(), HasPendingTracks(), and EffectTruncSilence::ProcessAll().
|
inline |
bool TrackList::CanMoveDown | ( | Track * | t | ) | const |
Definition at line 906 of file Track.cpp.
References GetNext().
bool TrackList::CanMoveUp | ( | Track * | t | ) | const |
|
inline |
Definition at line 1392 of file Track.h.
References PackedArray::begin().
|
inline |
Definition at line 1393 of file Track.h.
References PackedArray::end().
|
inlinestatic |
Definition at line 1539 of file Track.h.
Referenced by RealtimeEffectManager::AddState(), 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{ClipMenus.cpp}::FindClipBoundaries(), anonymous_namespace{ClipMenus.cpp}::FindClips(), anonymous_namespace{WaveClipTrimHandle.cpp}::FindClipsInChannels(), TrackView::GetChannelGroupHeight(), ContrastDialog::GetDB(), CommonTrackView::GetMinimizedHeight(), MixerTrackCluster::GetRight(), VampEffect::Init(), ClipMoveState::Init(), TrackPanelAx::IsFocused(), LOFImportFileHandle::lofOpenFiles(), MixAndRender(), TrackPanel::OnEnsureVisible(), FormatMenuTable::OnFormatChange(), WaveTrackMenuTable::OnMultiView(), EditActions::Handler::OnPaste(), WaveTrackMenuTable::OnSetDisplay(), TrackMenuTable::OnSetName(), SpectrumVRulerMenuTable::OnSpectrumScaleType(), EditActions::Handler::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(), TrackPanel::RefreshTrack(), RealtimeEffectManager::RemoveState(), 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 1517 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 823 of file Track.cpp.
References DeletionEvent(), mPendingUpdates, and mUpdaters.
Referenced by ~TrackList().
void TrackList::ClearPendingTracks | ( | ListOfTracks * | pAdded = nullptr | ) |
Definition at line 1099 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 1000 of file Track.cpp.
References make_iterator_range().
|
static |
Definition at line 502 of file Track.cpp.
Referenced by Effect::CopyInputTracks(), ProjectFileManager::DoSave(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), UndoManager::ModifyState(), EditActions::Handler::OnCopy(), EditActions::Handler::OnCut(), EditActions::Handler::OnSplitCut(), EffectBase::Preview(), EffectTwoPassSimpleMono::Process(), UndoManager::PushState(), ProjectFileManager::ReadProjectFile(), and ProjectFileIO::SaveProject().
|
private |
Definition at line 600 of file Track.cpp.
References QueueEvent(), and TrackListEvent::TRACK_DATA_CHANGE.
|
private |
Definition at line 618 of file Track.cpp.
References TrackListEvent::DELETION, and QueueEvent().
Referenced by Clear(), ClearPendingTracks(), and Remove().
Definition at line 715 of file Track.cpp.
References AdditionEvent(), getEnd(), getPrev(), RecalcPositions(), and sCounter.
Definition at line 703 of file Track.cpp.
References AdditionEvent(), getBegin(), RecalcPositions(), sCounter, Track::SetId(), and Track::SetOwner().
bool TrackList::empty | ( | ) | const |
Definition at line 1005 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 638 of file Track.cpp.
References Track::Any(), and getEnd().
|
inline |
Definition at line 1389 of file Track.h.
Referenced by TimeShiftHandle::DoSlideVertical(), empty(), HasPendingTracks(), MakeMultiChannelTrack(), and RecalcPositions().
|
inline |
|
inlineprivate |
|
private |
Definition at line 606 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 1409 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 1397 of file Track.h.
Referenced by TimeShiftHandle::DoSlideVertical(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), anonymous_namespace{TrackView.cpp}::TrackPositioner::OnUpdate(), and RecalcPositions().
Definition at line 692 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 648 of file Track.cpp.
References ActiveProjects::Find(), and Track::IsLeader().
Referenced by TrackPanel::FindTrackRect(), TrackPanel::RefreshTrack(), TrackFocus::Set(), and SwapNodes().
|
static |
Definition at line 486 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(), Exporter::CheckMix(), ProjectAudioManager::ChooseExistingRecordingTracks(), ButtonHandle::Click(), TrackPanelResizeHandle::Click(), LabelDefaultClickHandle::Click(), LabelGlyphHandle::Click(), BrushHandle::Click(), SelectHandle::Click(), TimeShiftHandle::Click(), BackgroundHandle::Click(), CutCopyAvailableFlag(), DefaultPlayOptions(), 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{SelectMenus.cpp}::DoNextPeakFrequency(), 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(), EditableTracksSelectedPred(), 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(), 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(), ProjectHistory::InitialState(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), LabelTracksExistFlag(), LOFImportFileHandle::lofOpenFiles(), MixerBoard::MixerBoard(), ProjectHistory::ModifyState(), anonymous_namespace{SelectMenus.cpp}::MoveWhenAudioInactive(), TrackActions::Handler::MuteTracks(), anonymous_namespace{SelectMenus.cpp}::NearestZeroCrossing(), LabelTrack::New(), NoteTrack::New(), TimeTrack::New(), WaveTrack::New(), anonymous_namespace{FileMenus.cpp}::NoteTracksExistFlag(), ApplyMacroDialog::OnApplyToFiles(), ProjectManager::OnCloseWindow(), ViewActions::Handler::OnCollapseAllTracks(), ProjectAudioManager::OnCommitRecording(), EditActions::Handler::OnCopy(), LabelEditActions::Handler::OnCopyLabels(), SelectActions::Handler::OnCursorTrackEnd(), SelectActions::Handler::OnCursorTrackStart(), EditActions::Handler::OnCut(), LabelEditActions::Handler::OnCutLabels(), EditActions::Handler::OnDelete(), LabelEditActions::Handler::OnDeleteLabels(), EditActions::Handler::OnDisjoin(), LabelEditActions::Handler::OnDisjoinLabels(), EditActions::Handler::OnDuplicate(), AudacityApp::OnExceptionInMainLoop(), ViewActions::Handler::OnExpandAllTracks(), FileActions::Handler::OnExportLabels(), FileActions::Handler::OnExportMIDI(), NavigationActions::Handler::OnFirstTrack(), ContrastDialog::OnGetBackground(), ContrastDialog::OnGetForeground(), FileActions::Handler::OnImportLabels(), EditActions::Handler::OnJoin(), LabelEditActions::Handler::OnJoinLabels(), NavigationActions::Handler::OnLastTrack(), WaveTrackMenuTable::OnMergeStereo(), LabelEditActions::Handler::OnNewLabelTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::Handler::OnNewStereoTrack(), anonymous_namespace{TimeTrackMenuItems.cpp}::Handler::OnNewTimeTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::Handler::OnNewWaveTrack(), EditActions::Handler::OnPaste(), LabelEditActions::Handler::OnPasteNewLabel(), FileActions::Handler::OnPrint(), ProjectAudioManager::OnRecord(), EditActions::Handler::OnRedo(), TrackActions::Handler::OnResample(), SelectActions::Handler::OnSelectAll(), SelectActions::Handler::OnSelectCursorEnd(), SelectActions::Handler::OnSelectStartCursor(), SelectActions::Handler::OnSelectSyncLockSel(), SelectActions::Handler::OnSelectTrackStartToEnd(), ScreenshotBigDialog::OnShortTracks(), EditActions::Handler::OnSilence(), LabelEditActions::Handler::OnSilenceLabels(), EditActions::Handler::OnSplit(), EditActions::Handler::OnSplitCut(), LabelEditActions::Handler::OnSplitCutLabels(), EditActions::Handler::OnSplitDelete(), LabelEditActions::Handler::OnSplitDeleteLabels(), LabelEditActions::Handler::OnSplitLabels(), EditActions::Handler::OnSplitNew(), WaveTrackMenuTable::OnSwapChannels(), TransportActions::Handler::OnTimerRecord(), TrackActions::Handler::OnTrackMoveBottom(), TrackActions::Handler::OnTrackMoveDown(), TrackActions::Handler::OnTrackMoveTop(), TrackActions::Handler::OnTrackMoveUp(), EditActions::Handler::OnTrim(), EditActions::Handler::OnUndo(), anonymous_namespace{TrackView.cpp}::TrackPositioner::OnUpdate(), ProjectFileManager::OpenProjectFile(), TimeTrack::PasteInto(), anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag(), TranscriptionToolBar::PlayAtSpeed(), ProjectAudioManager::PlayPlayRegion(), ProjectHistory::PopState(), TrackSelectHandle::Preview(), NyquistEffect::Process(), SpectralDataManager::ProcessTracks(), TrackPanel::ProcessUIHandleResult(), ProjectHistory::PushState(), ProjectFileManager::ReadProjectFile(), ProjectHistory::RedoAvailable(), ProjectWindow::RedrawProject(), ButtonHandle::Release(), LabelTextHandle::Release(), NoteTrackButtonHandle::Release(), NoteTrackVZoomHandle::Release(), SpectrumVZoomHandle::Release(), WaveformVZoomHandle::Release(), TimeTrackVZoomHandle::Release(), AffordanceHandle::Release(), LabelDefaultClickHandle::RestoreState(), 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{TrackView.cpp}::TrackPositioner::TrackPositioner(), TracksExistFlag(), ProjectHistory::UndoAvailable(), ProjectSettings::UpdatePrefs(), WaveTracksExistFlag(), WaveTracksSelectedFlag(), ProjectFileIO::WriteXML(), ProjectWindow::ZoomAfterImport(), ZoomInAvailableFlag(), and ZoomOutAvailableFlag().
|
static |
Definition at line 491 of file Track.cpp.
References Get().
|
inlineprivate |
Definition at line 1679 of file Track.h.
References PackedArray::begin().
Referenced by ClearPendingTracks(), DoAddToHead(), and Permute().
|
inlineprivate |
Definition at line 1676 of file Track.h.
References PackedArray::end().
Referenced by DoAdd(), EmptyRange(), Remove(), and size().
double TrackList::GetEndTime | ( | ) | const |
Definition at line 1048 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), and Track::GetEndTime().
Referenced by SelectTimeCommand::Apply(), DefaultPlayOptions(), LOFImportFileHandle::doDurationAndScrollOffset(), ExportMultipleDialog::ExportMultipleByLabel(), AudacityPrintout::OnPrintPage(), and AdornedRulerPanel::StartQPPlay().
double TrackList::GetMinOffset | ( | ) | const |
Definition at line 1038 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 846 of file Track.cpp.
References getNext(), Track::GetNode(), Track::HasLinkedTrack(), and isNull().
Referenced by CanMoveDown(), and MoveDown().
|
inlineprivate |
|
inline |
Definition at line 1371 of file Track.h.
Referenced by EffectBase::FindProject(), and EffectBase::Preview().
|
inline |
Definition at line 865 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 1043 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 1332 of file Track.cpp.
References begin(), end(), Track::GetId(), and mPendingUpdates.
|
inlineprivate |
Definition at line 1673 of file Track.h.
References PackedArray::end().
Referenced by GetNext(), GetPrev(), RecalcPositions(), Remove(), and SwapNodes().
|
inline |
Definition at line 1469 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 1476 of file Track.h.
References Track::IsLeader().
|
inline |
Definition at line 1601 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 766 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 543 of file Track.cpp.
Referenced by LabelTrack::Create(), and EffectBase::DoEffect().
bool TrackList::MoveDown | ( | Track * | t | ) |
Definition at line 987 of file Track.cpp.
References GetNext(), Track::GetNode(), and SwapNodes().
bool TrackList::MoveUp | ( | Track * | t | ) |
Definition at line 974 of file Track.cpp.
References Track::GetNode(), GetPrev(), and SwapNodes().
|
private |
Definition at line 613 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 678 of file Track.cpp.
References PackedArray::end(), getBegin(), PermutationEvent(), RecalcPositions(), and Track::SetOwner().
|
private |
Definition at line 587 of file Track.cpp.
References BasicUI::CallAfter().
Referenced by AdditionEvent(), DataEvent(), DeletionEvent(), EnsureVisibleEvent(), PermutationEvent(), ResizingEvent(), and SelectionEvent().
|
private |
Definition at line 564 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 1054 of file Track.cpp.
References Track::Clone(), mPendingUpdates, and mUpdaters.
Referenced by ProjectAudioManager::DoRecord().
void TrackList::RegisterPendingNewTrack | ( | const std::shared_ptr< Track > & | pTrack | ) |
Definition at line 1075 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 802 of file Track.cpp.
References DeletionEvent(), getEnd(), getNext(), Track::GetNode(), isNull(), RecalcPositions(), and Track::SetOwner().
Referenced by EffectBase::DoEffect(), and EffectBase::ReplaceProcessedTracks().
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 728 of file Track.cpp.
References Track::SetId(), and Track::SetOwner().
Referenced by ApplyPendingTracks(), Effect::ModifiedAnalysisTrack::ModifiedAnalysisTrack(), and EffectBase::ReplaceProcessedTracks().
|
private |
Definition at line 633 of file Track.cpp.
References QueueEvent(), and TrackListEvent::RESIZING.
|
inline |
Definition at line 1452 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(), 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 1459 of file Track.h.
References Track::IsSelected().
|
inline |
Definition at line 1486 of file Track.h.
References Track::IsSelectedLeader().
Referenced by EffectBase::CountWaveTracks(), ContrastDialog::GetDB(), and TrackPanel::GetSelectedTrackCount().
|
inline |
Definition at line 1493 of file Track.h.
References Track::IsSelectedLeader().
|
private |
Definition at line 595 of file Track.cpp.
References QueueEvent(), and TrackListEvent::SELECTION_CHANGE.
|
inlinestatic |
Definition at line 1503 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 1010 of file Track.cpp.
References empty(), getEnd(), and getPrev().
Referenced by ScreenshotCommand::Apply(), and ProjectSettings::UpdatePrefs().
void TrackList::Swap | ( | TrackList & | that | ) |
Definition at line 518 of file Track.cpp.
|
static |
If the given track is one of a pair of channels, swap them.
Definition at line 657 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 915 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 1628 of file Track.h.
|
inlineprivate |
void TrackList::UnlinkChannels | ( | Track & | track | ) |
Removes linkage if track belongs to a group.
Definition at line 750 of file Track.cpp.
References Channels(), Track::mList, Track::None, and THROW_INCONSISTENCY_EXCEPTION.
Referenced by WaveTrackMenuTable::SplitStereo().
void TrackList::UpdatePendingTracks | ( | ) |
Definition at line 1081 of file Track.cpp.
References FindById(), mPendingUpdates, mUpdaters, and anonymous_namespace{LogWindow.cpp}::pUpdater.
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 1773 of file Track.h.
Referenced by ApplyPendingTracks(), Clear(), ClearPendingTracks(), HasPendingTracks(), RegisterPendingChangedTrack(), and UpdatePendingTracks().
|
private |
This is in correspondence with mPendingUpdates.
Definition at line 1775 of file Track.h.
Referenced by Clear(), ClearPendingTracks(), RegisterPendingChangedTrack(), and UpdatePendingTracks().
|
staticprivate |
Definition at line 1721 of file Track.h.
Referenced by ApplyPendingTracks(), DoAdd(), and DoAddToHead().