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

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

An ExternalPlayheadSynchroniser is used to synchronise the internal Edit's playhead with an AudioProcessor, for use in plugins. More...

#include "tracktion_ExternalPlayheadSynchroniser.h"

Public Member Functions

 ExternalPlayheadSynchroniser (Edit &)
 Constructs an ExternalPlayheadSynchroniser.
 
bool synchronise (juce::AudioPlayHead &)
 Synchronises the Edit's playback position with an AudioPlayHead if possible.
 
bool synchronise (juce::AudioProcessor &)
 Synchronises the Edit's playback position with the AudioProcessor's playhead if possible.
 
juce::AudioPlayHead::CurrentPositionInfo getPositionInfo () const
 Returns the current position info, useful for graphical displays etc.
 

Detailed Description

An ExternalPlayheadSynchroniser is used to synchronise the internal Edit's playhead with an AudioProcessor, for use in plugins.

Just create one when you create your Edit and repeatedly call the synchronise method in your process block like this:

void processBlock (juce::AudioBuffer<float>& buffer, juce::MidiBuffer& midi) override
{
// Update position info first
externalPlayheadSynchroniser.synchronise (*this);
...

Definition at line 37 of file tracktion_ExternalPlayheadSynchroniser.h.

Constructor & Destructor Documentation

◆ ExternalPlayheadSynchroniser()

tracktion::engine::ExternalPlayheadSynchroniser::ExternalPlayheadSynchroniser ( Edit e)

Member Function Documentation

◆ getPositionInfo()

juce::AudioPlayHead::CurrentPositionInfo tracktion::engine::ExternalPlayheadSynchroniser::getPositionInfo ( ) const

Returns the current position info, useful for graphical displays etc.

Definition at line 208 of file tracktion_ExternalPlayheadSynchroniser.cpp.

◆ synchronise() [1/2]

bool tracktion::engine::ExternalPlayheadSynchroniser::synchronise ( juce::AudioPlayHead playhead)

Synchronises the Edit's playback position with an AudioPlayHead if possible.

Generally you'd call this at the start of your plugin's processBlock method.

Returns
true if it was able to synchronise, false otherwise.

Definition at line 137 of file tracktion_ExternalPlayheadSynchroniser.cpp.

◆ synchronise() [2/2]

bool tracktion::engine::ExternalPlayheadSynchroniser::synchronise ( juce::AudioProcessor processor)

Synchronises the Edit's playback position with the AudioProcessor's playhead if possible.

Generally you'd call this at the start of your plugin's processBlock method.

Returns
true if it was able to synchronise, false otherwise.

Definition at line 200 of file tracktion_ExternalPlayheadSynchroniser.cpp.


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