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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_LauncherClipPlaybackHandle.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11
12namespace tracktion { inline namespace engine
13{
14
15//==============================================================================
16//==============================================================================
18{
19public:
20 //==============================================================================
21 static LauncherClipPlaybackHandle forLooping (BeatRange loopRange,
22 BeatDuration offset);
23
24 static LauncherClipPlaybackHandle forOneShot (BeatRange clipRange);
25
26 //==============================================================================
30 void start (BeatPosition);
31
33 void stop();
34
37
40 {
41 BeatRange range1, range2;
42 bool playing1 = false, playing2 = false;
43 };
44
50
56
57private:
58 //==============================================================================
59 BeatRange clipRange, loopRange;
60 BeatDuration offset;
61 bool isLooping = false;
62
63 std::optional<BeatPosition> playStartPosition;
64
66};
67
68}} // namespace tracktion { inline namespace engine
void start(BeatPosition)
Signifies that the clip has started at a given position.
SplitBeatRange timelineRangeToClipSourceRange(BeatRange) const
Converts a timeline range (e.g.
std::optional< BeatPosition > getStart() const
If the clip has been started, this will return that position.
std::optional< float > getProgress(BeatPosition) const
Returns the progress through a clip's source.
Represents a duration in beats.
Represents a position in beats.