TracktionEngine
|
Holds the state of a process call. More...
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. More... | |
ProcessState (tracktion::graph::PlayHeadState &, const TempoSequence &) | |
Creates a ProcessState that will update the editBeatRange field. More... | |
ProcessState (tracktion::graph::PlayHeadState &, const tempo::Sequence &) | |
Creates a ProcessState that will update the editBeatRange field. More... | |
void | update (double sampleRate, juce::Range< int64_t > referenceSampleRange, UpdateContinuityFlags) |
Updates the internal state based on a reference sample range. More... | |
void | setPlaybackSpeedRatio (double newRatio) |
Sets a playback speed ratio. More... | |
void | setTempoSequence (const tempo::Sequence *) |
Sets the TempoSequence this state utilises. More... | |
const tempo::Sequence * | getTempoSequence () const |
Returns the tempo::Sequence this state has been initialised with one. More... | |
const tempo::Sequence::Position * | getTempoSequencePosition () const |
Returns the tempo::Sequence::Position this state uses. More... | |
Public Attributes | |
tracktion::graph::PlayHeadState & | playHeadState |
double | sampleRate = 44100.0 |
double | playbackSpeedRatio = 1.0 |
int | numSamples = 0 |
juce::Range< int64_t > | referenceSampleRange |
juce::Range< int64_t > | timelineSampleRange |
TimeRange | editTimeRange |
BeatRange | editBeatRange |
Holds the state of a process call.
An enum to indicate if the PlayHeadState continuity should be updated.
Enumerator | |
---|---|
no | |
yes |
tracktion::engine::ProcessState::ProcessState | ( | tracktion::graph::PlayHeadState & | ) |
Creates a ProcessState.
tracktion::engine::ProcessState::ProcessState | ( | tracktion::graph::PlayHeadState & | , |
const TempoSequence & | |||
) |
Creates a ProcessState that will update the editBeatRange field.
tracktion::engine::ProcessState::ProcessState | ( | tracktion::graph::PlayHeadState & | , |
const tempo::Sequence & | |||
) |
Creates a ProcessState that will update the editBeatRange field.
void tracktion::engine::ProcessState::update | ( | double | sampleRate, |
juce::Range< int64_t > | referenceSampleRange, | ||
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. |
Referenced by tracktion::engine::MultiThreadedNodePlayer::process().
void tracktion::engine::ProcessState::setPlaybackSpeedRatio | ( | double | newRatio | ) |
Sets a playback speed ratio.
Some Nodes might use this to adjust their playback speeds.
void tracktion::engine::ProcessState::setTempoSequence | ( | const tempo::Sequence * | ) |
Sets the TempoSequence this state utilises.
const tempo::Sequence* tracktion::engine::ProcessState::getTempoSequence | ( | ) | const |
Returns the tempo::Sequence this state has been initialised with one.
const tempo::Sequence::Position* tracktion::engine::ProcessState::getTempoSequencePosition | ( | ) | const |
Returns the tempo::Sequence::Position this state uses.
tracktion::graph::PlayHeadState& tracktion::engine::ProcessState::playHeadState |
Referenced by tracktion::engine::TracktionEngineNode::getPlayHeadState().
double tracktion::engine::ProcessState::sampleRate = 44100.0 |
double tracktion::engine::ProcessState::playbackSpeedRatio = 1.0 |
int tracktion::engine::ProcessState::numSamples = 0 |
Referenced by tracktion::engine::TracktionEngineNode::getNumSamples().
juce::Range<int64_t> tracktion::engine::ProcessState::referenceSampleRange |
juce::Range<int64_t> tracktion::engine::ProcessState::timelineSampleRange |
TimeRange tracktion::engine::ProcessState::editTimeRange |
BeatRange tracktion::engine::ProcessState::editBeatRange |
Referenced by tracktion::engine::TracktionEngineNode::getEditBeatRange().