|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Holds the state of a process call. More...
#include "tracktion_TracktionEngineNode.h"
Public Types | |
| enum class | UpdateContinuityFlags { no , yes } |
| An enum to indicate if the PlayHeadState continuity should be updated. More... | |
Public Member Functions | |
| ProcessState (tracktion::graph::PlayHeadState &) | |
| Creates a ProcessState. | |
| ProcessState (tracktion::graph::PlayHeadState &, const TempoSequence &) | |
| Creates a ProcessState that will update the editBeatRange field. | |
| ProcessState (tracktion::graph::PlayHeadState &, const tempo::Sequence &) | |
| Creates a ProcessState that will update the editBeatRange field. | |
| void | update (double sampleRate, juce::Range< int64_t > referenceSampleRange, UpdateContinuityFlags) |
| Updates the internal state based on a reference sample range. | |
| void | setPlaybackSpeedRatio (double newRatio) |
| Sets a playback speed ratio. | |
| void | setTempoSequence (const tempo::Sequence *) |
| Sets the TempoSequence this state utilises. | |
| const tempo::Sequence * | getTempoSequence () const |
| Returns the tempo::Sequence this state has been initialised with one. | |
| const tempo::Sequence::Position * | getTempoSequencePosition () const |
| Returns the tempo::Sequence::Position this state uses. | |
| SyncRange | getSyncRange () const |
| Returns the SyncRange for the current audio block. | |
| SyncPoint | getSyncPoint () const |
| Returns the end of the SyncRange. | |
| void | setSyncRange (SyncRange) |
Public Attributes | |
| std::function< void()> | onContinuityUpdated |
| Callback which can be set to be called when the continuity changes. | |
| tracktion::graph::PlayHeadState & | playHeadState |
| double | sampleRate |
| double | playbackSpeedRatio |
| int | numSamples |
| juce::Range< int64_t > | referenceSampleRange |
| juce::Range< int64_t > | timelineSampleRange |
| TimeRange | editTimeRange |
| BeatRange | editBeatRange |
Holds the state of a process call.
Definition at line 19 of file tracktion_TracktionEngineNode.h.
|
strong |
An enum to indicate if the PlayHeadState continuity should be updated.
Definition at line 31 of file tracktion_TracktionEngineNode.h.
| tracktion::engine::ProcessState::ProcessState | ( | tracktion::graph::PlayHeadState & | phs | ) |
Creates a ProcessState.
Definition at line 14 of file tracktion_TracktionEngineNode.cpp.
| tracktion::engine::ProcessState::ProcessState | ( | tracktion::graph::PlayHeadState & | phs, |
| const TempoSequence & | seq | ||
| ) |
Creates a ProcessState that will update the editBeatRange field.
Definition at line 19 of file tracktion_TracktionEngineNode.cpp.
| tracktion::engine::ProcessState::ProcessState | ( | tracktion::graph::PlayHeadState & | phs, |
| const tempo::Sequence & | seq | ||
| ) |
Creates a ProcessState that will update the editBeatRange field.
Definition at line 24 of file tracktion_TracktionEngineNode.cpp.
| SyncPoint tracktion::engine::ProcessState::getSyncPoint | ( | ) | const |
Returns the end of the SyncRange.
Definition at line 113 of file tracktion_TracktionEngineNode.cpp.
| SyncRange tracktion::engine::ProcessState::getSyncRange | ( | ) | const |
Returns the SyncRange for the current audio block.
Technically, this is only valid during processing but the end of the range can be used to schedule future events assuming the tempo doesn't change between now and the sceduled time.
If the tempo does change, the time will be incorrect but the MonotonicBeat will still be in sync.
Definition at line 118 of file tracktion_TracktionEngineNode.cpp.
| const tempo::Sequence * tracktion::engine::ProcessState::getTempoSequence | ( | ) | const |
Returns the tempo::Sequence this state has been initialised with one.
Definition at line 103 of file tracktion_TracktionEngineNode.cpp.
| const tempo::Sequence::Position * tracktion::engine::ProcessState::getTempoSequencePosition | ( | ) | const |
Returns the tempo::Sequence::Position this state uses.
Definition at line 108 of file tracktion_TracktionEngineNode.cpp.
| void tracktion::engine::ProcessState::setPlaybackSpeedRatio | ( | double | newRatio | ) |
Sets a playback speed ratio.
Some Nodes might use this to adjust their playback speeds.
Definition at line 85 of file tracktion_TracktionEngineNode.cpp.
| void tracktion::engine::ProcessState::setSyncRange | ( | SyncRange | r | ) |
Definition at line 123 of file tracktion_TracktionEngineNode.cpp.
| void tracktion::engine::ProcessState::setTempoSequence | ( | const tempo::Sequence * | ts | ) |
Sets the TempoSequence this state utilises.
Definition at line 90 of file tracktion_TracktionEngineNode.cpp.
| void tracktion::engine::ProcessState::update | ( | double | sampleRate, |
| juce::Range< int64_t > | referenceSampleRange, | ||
| UpdateContinuityFlags | updateContinuityFlags | ||
| ) |
Updates the internal state based on a reference sample range.
| UpdateContinuityFlags | If yes, the PlayHeadState will be updated, if no it won't be. If you are calling update more than once in a block, for example to update the reference sample range for timeline position, updating the continuity flags more than once will render it useless as it tracks changes from one call to the next. This flag lets you ensure it is only called once per block. |
Definition at line 31 of file tracktion_TracktionEngineNode.cpp.
| BeatRange tracktion::engine::ProcessState::editBeatRange |
Definition at line 85 of file tracktion_TracktionEngineNode.h.
| TimeRange tracktion::engine::ProcessState::editTimeRange |
Definition at line 84 of file tracktion_TracktionEngineNode.h.
| int tracktion::engine::ProcessState::numSamples |
Definition at line 82 of file tracktion_TracktionEngineNode.h.
| std::function<void()> tracktion::engine::ProcessState::onContinuityUpdated |
Callback which can be set to be called when the continuity changes.
This will be made on the audio thread so shouldn't block.
Definition at line 75 of file tracktion_TracktionEngineNode.h.
| double tracktion::engine::ProcessState::playbackSpeedRatio |
Definition at line 81 of file tracktion_TracktionEngineNode.h.
| tracktion::graph::PlayHeadState& tracktion::engine::ProcessState::playHeadState |
Definition at line 80 of file tracktion_TracktionEngineNode.h.
| juce::Range<int64_t> tracktion::engine::ProcessState::referenceSampleRange |
Definition at line 83 of file tracktion_TracktionEngineNode.h.
| double tracktion::engine::ProcessState::sampleRate |
Definition at line 81 of file tracktion_TracktionEngineNode.h.
| juce::Range<int64_t> tracktion::engine::ProcessState::timelineSampleRange |
Definition at line 83 of file tracktion_TracktionEngineNode.h.