tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
tracktion::engine::LaunchHandle Class Reference

A handle used to control the launching of a clip. More...

#include "tracktion_LaunchHandle.h"

Classes

struct  SplitStatus
 Represents two beat ranges where the play state can be different in each. More...
 

Public Types

enum class  PlayState { stopped , playing }
 
enum class  QueueState { stopQueued , playQueued }
 

Public Member Functions

 LaunchHandle ()=default
 Creates a LaunchHandle.
 
PlayState getPlayingStatus () const
 Returns the current playback state.
 
std::optional< QueueState > getQueuedStatus () const
 Returns the current queue state.
 
std::optional< MonotonicBeatgetQueuedEventPosition () const
 Returns the current queued event time.
 
void play (std::optional< MonotonicBeat >)
 Start playing, optionally at a given beat position.
 
void stop (std::optional< MonotonicBeat >)
 Stop playing, optionally at a given beat position.
 
SplitStatus advance (const SyncRange &)
 Advance the state.
 
std::optional< BeatRange > getPlayedRange () const
 Returns the Edit beat range this has been playing for.
 
std::optional< MonotonicBeatRangegetPlayedMonotonicRange () const
 Returns the monotonic beat range this has been playing for.
 
std::optional< BeatRange > getLastPlayedRange () const
 

Detailed Description

A handle used to control the launching of a clip.

This doesn't directly map on to playback beat positions of the clip, it just handles the start/stop status in relation to the Edit timeline. Once this has been retrieved by calling update, this needs to be wrapped in to playback actions.

Definition at line 25 of file tracktion_LaunchHandle.h.


Class Documentation

◆ tracktion::engine::LaunchHandle::SplitStatus

struct tracktion::engine::LaunchHandle::SplitStatus

Represents two beat ranges where the play state can be different in each.

Definition at line 62 of file tracktion_LaunchHandle.h.

Class Members
bool isSplit
bool playing1
bool playing2
optional< BeatPosition > playStartTime1
optional< BeatPosition > playStartTime2
BeatRange range1
BeatRange range2

Member Enumeration Documentation

◆ PlayState

enum class tracktion::engine::LaunchHandle::PlayState
strong

Definition at line 29 of file tracktion_LaunchHandle.h.

◆ QueueState

enum class tracktion::engine::LaunchHandle::QueueState
strong

Definition at line 35 of file tracktion_LaunchHandle.h.

Member Function Documentation

◆ advance()

auto tracktion::engine::LaunchHandle::advance ( const SyncRange syncRange)

Advance the state.

N.B. This should only be called by the audio thread.

Parameters
SyncRangeThe current SyncRange. Used to sync launch positions to
Returns
The unlooped Edit beat range split if there are different play/stop states. [[ audio_thread ]]

Definition at line 79 of file tracktion_LaunchHandle.cpp.

◆ getLastPlayedRange()

std::optional< BeatRange > tracktion::engine::LaunchHandle::getLastPlayedRange ( ) const

Definition at line 74 of file tracktion_LaunchHandle.cpp.

◆ getPlayedMonotonicRange()

std::optional< MonotonicBeatRange > tracktion::engine::LaunchHandle::getPlayedMonotonicRange ( ) const

Returns the monotonic beat range this has been playing for.

N.B. This is really only useful for syncing to other timeline events.

Definition at line 69 of file tracktion_LaunchHandle.cpp.

◆ getPlayedRange()

std::optional< BeatRange > tracktion::engine::LaunchHandle::getPlayedRange ( ) const

Returns the Edit beat range this has been playing for.

N.B. The length is unlooped and so monotonically increasing.

Definition at line 64 of file tracktion_LaunchHandle.cpp.

◆ getPlayingStatus()

LaunchHandle::PlayState tracktion::engine::LaunchHandle::getPlayingStatus ( ) const

Returns the current playback state.

Definition at line 17 of file tracktion_LaunchHandle.cpp.

◆ getQueuedEventPosition()

std::optional< MonotonicBeat > tracktion::engine::LaunchHandle::getQueuedEventPosition ( ) const

Returns the current queued event time.

Definition at line 27 of file tracktion_LaunchHandle.cpp.

◆ getQueuedStatus()

std::optional< LaunchHandle::QueueState > tracktion::engine::LaunchHandle::getQueuedStatus ( ) const

Returns the current queue state.

Definition at line 22 of file tracktion_LaunchHandle.cpp.

◆ play()

void tracktion::engine::LaunchHandle::play ( std::optional< MonotonicBeat pos)

Start playing, optionally at a given beat position.

Definition at line 32 of file tracktion_LaunchHandle.cpp.

◆ stop()

void tracktion::engine::LaunchHandle::stop ( std::optional< MonotonicBeat pos)

Stop playing, optionally at a given beat position.

Definition at line 42 of file tracktion_LaunchHandle.cpp.


The documentation for this class was generated from the following files: