TracktionEngine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
engine::PluginRenderContext Struct Reference

The context passed to plugin render methods to provide it with buffers to fill. More...

#include <tracktion_Plugin.h>

Public Member Functions

 PluginRenderContext (juce::AudioBuffer< float > *buffer, int bufferStart, int bufferSize, MidiMessageArray *midiBuffer, double midiOffset, TimeRange editTime, bool playing, bool scrubbing, bool rendering, bool allowBypassedProcessing) noexcept
 
 PluginRenderContext (juce::AudioBuffer< float > *buffer, const juce::AudioChannelSet &bufferChannels, int bufferStart, int bufferSize, MidiMessageArray *midiBuffer, double midiOffset, TimeRange editTime, bool playing, bool scrubbing, bool rendering, bool allowBypassedProcessing) noexcept
 
 PluginRenderContext (const PluginRenderContext &)=default
 Creates a copy of another PluginRenderContext.
 
 PluginRenderContext (PluginRenderContext &&)=default
 
PluginRenderContextoperator= (const PluginRenderContext &)=delete
 Deleted assignment operators.
 
PluginRenderContextoperator= (PluginRenderContext &&)=delete
 

Public Attributes

juce::AudioBuffer< float > * destBuffer = nullptr
 The target audio buffer which needs to be filled.
 
juce::AudioChannelSet destBufferChannels
 
int bufferStartSample = 0
 The index of the start point in the audio buffer from which data must be written.
 
int bufferNumSamples = 0
 The number of samples to write into the audio buffer.
 
MidiMessageArraybufferForMidiMessages = nullptr
 A buffer of MIDI events to process.
 
double midiBufferOffset = 0.0
 A time offset to add to the timestamp of any events in the MIDI buffer.
 
TimeRange editTime
 The edit time range this context represents.
 
bool isPlaying = false
 True if the the playhead is currently playing.
 
bool isScrubbing = false
 True if the the audio is currently being scrubbed.
 
bool isRendering = false
 True if the rendering is happening as part of an offline render rather than live playback.
 
bool allowBypassedProcessing = false
 If this is true and the plugin supports it, this will call the bypassed processing method of the plugin.
 

Detailed Description

The context passed to plugin render methods to provide it with buffers to fill.

Constructor & Destructor Documentation

◆ PluginRenderContext() [1/4]

engine::PluginRenderContext::PluginRenderContext ( juce::AudioBuffer< float > *  buffer,
int  bufferStart,
int  bufferSize,
MidiMessageArray midiBuffer,
double  midiOffset,
TimeRange  editTime,
bool  playing,
bool  scrubbing,
bool  rendering,
bool  allowBypassedProcessing 
)
noexcept

◆ PluginRenderContext() [2/4]

engine::PluginRenderContext::PluginRenderContext ( juce::AudioBuffer< float > *  buffer,
const juce::AudioChannelSet &  bufferChannels,
int  bufferStart,
int  bufferSize,
MidiMessageArray midiBuffer,
double  midiOffset,
TimeRange  editTime,
bool  playing,
bool  scrubbing,
bool  rendering,
bool  allowBypassedProcessing 
)
noexcept
Deprecated:
Use the constructor without the bufferChannels parameter. The destBufferChannels field was never used by the engine.

◆ PluginRenderContext() [3/4]

engine::PluginRenderContext::PluginRenderContext ( const PluginRenderContext )
default

Creates a copy of another PluginRenderContext.

◆ PluginRenderContext() [4/4]

engine::PluginRenderContext::PluginRenderContext ( PluginRenderContext &&  )
default

Member Function Documentation

◆ operator=() [1/2]

PluginRenderContext & engine::PluginRenderContext::operator= ( const PluginRenderContext )
delete

Deleted assignment operators.

◆ operator=() [2/2]

PluginRenderContext & engine::PluginRenderContext::operator= ( PluginRenderContext &&  )
delete

Member Data Documentation

◆ destBuffer

juce::AudioBuffer<float>* engine::PluginRenderContext::destBuffer = nullptr

The target audio buffer which needs to be filled.

This may be nullptr if no audio is being processed.

◆ destBufferChannels

juce::AudioChannelSet engine::PluginRenderContext::destBufferChannels
Deprecated:
This field is not used by the engine and will be removed in a future version.

◆ bufferStartSample

int engine::PluginRenderContext::bufferStartSample = 0

The index of the start point in the audio buffer from which data must be written.

◆ bufferNumSamples

int engine::PluginRenderContext::bufferNumSamples = 0

The number of samples to write into the audio buffer.

◆ bufferForMidiMessages

MidiMessageArray* engine::PluginRenderContext::bufferForMidiMessages = nullptr

A buffer of MIDI events to process.

This may be nullptr if no MIDI is being sent

◆ midiBufferOffset

double engine::PluginRenderContext::midiBufferOffset = 0.0

A time offset to add to the timestamp of any events in the MIDI buffer.

◆ editTime

TimeRange engine::PluginRenderContext::editTime

The edit time range this context represents.

◆ isPlaying

bool engine::PluginRenderContext::isPlaying = false

True if the the playhead is currently playing.

◆ isScrubbing

bool engine::PluginRenderContext::isScrubbing = false

True if the the audio is currently being scrubbed.

◆ isRendering

bool engine::PluginRenderContext::isRendering = false

True if the rendering is happening as part of an offline render rather than live playback.

◆ allowBypassedProcessing

bool engine::PluginRenderContext::allowBypassedProcessing = false

If this is true and the plugin supports it, this will call the bypassed processing method of the plugin.

If this is false, the plugin simply won't be processed. This can be used to ensure bypassed plugins still introduce their reported latency.


The documentation for this struct was generated from the following file: