Audacity 3.2.0
Classes | Functions
TransportUtilities.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TransportUtilities
 

Functions

TransportSequences MakeTransportTracks (TrackList &trackList, bool selectedOnly, bool nonWaveToo=false)
 

Function Documentation

◆ MakeTransportTracks()

TransportSequences MakeTransportTracks ( TrackList trackList,
bool  selectedOnly,
bool  nonWaveToo = false 
)
Parameters
nonWaveTooif true, collect all PlayableTracks

Definition at line 208 of file TransportUtilities.cpp.

210{
211 TransportSequences result;
212 {
213 const auto range = trackList.Any<WaveTrack>()
214 + (selectedOnly ? &Track::IsSelected : &Track::Any);
215 for (auto pTrack : range)
216 result.playbackSequences.push_back(
217 StretchingSequence::Create(*pTrack, pTrack->GetClipInterfaces()));
218 }
219 if (nonWaveToo) {
220 const auto range = trackList.Any<const PlayableTrack>() +
221 (selectedOnly ? &Track::IsSelected : &Track::Any);
222 for (auto pTrack : range)
223 if (!track_cast<const SampleTrack *>(pTrack))
224 if (auto pSequence =
225 std::dynamic_pointer_cast<const OtherPlayableSequence>(
226 pTrack->shared_from_this())
227 )
228 result.otherPlayableSequences.push_back(pSequence);
229 }
230 return result;
231}
AudioTrack subclass that can also be audibly replayed by the program.
Definition: PlayableTrack.h:40
static std::shared_ptr< StretchingSequence > Create(const PlayableSequence &, const ClipConstHolders &clips)
bool IsSelected() const
Definition: Track.cpp:258
bool Any() const
Definition: Track.cpp:255
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:950
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
std::vector< std::shared_ptr< const OtherPlayableSequence > > otherPlayableSequences
Definition: AudioIO.h:73
ConstPlayableSequences playbackSequences
Definition: AudioIO.h:70

References TrackList::Any(), Track::Any(), StretchingSequence::Create(), Track::IsSelected(), TransportSequences::otherPlayableSequences, and TransportSequences::playbackSequences.

Referenced by EffectPreview(), anonymous_namespace{TransportMenus.cpp}::OnPunchAndRoll(), ProjectAudioManager::OnRecord(), and ProjectAudioManager::PlayPlayRegion().

Here is the call graph for this function:
Here is the caller graph for this function: