Loading...
Searching...
No Matches
ARARenderer Class Referenceabstract

Base class for a renderer fulfilling either the ARAPlaybackRenderer or the ARAEditorRenderer role. More...

#include <juce_ARAPlugInInstanceRoles.h>

Inheritance diagram for ARARenderer:

Public Types

enum class  AlwaysNonRealtime { no , yes }
 

Public Member Functions

virtual ~ARARenderer ()=default
 
virtual void prepareToPlay (double sampleRate, int maximumSamplesPerBlock, int numChannels, AudioProcessor::ProcessingPrecision precision, AlwaysNonRealtime alwaysNonRealtime=AlwaysNonRealtime::no)
 Initialises the renderer for playback.
 
virtual void releaseResources ()
 Frees render resources allocated in prepareToPlay().
 
virtual void reset ()
 Resets the internal state variables of the renderer.
 
virtual bool processBlock (AudioBuffer< float > &buffer, AudioProcessor::Realtime realtime, const AudioPlayHead::PositionInfo &positionInfo) noexcept=0
 Renders the output into the given buffer.
 
virtual bool processBlock (AudioBuffer< double > &buffer, AudioProcessor::Realtime realtime, const AudioPlayHead::PositionInfo &positionInfo) noexcept
 Renders the output into the given buffer.
 

Detailed Description

Base class for a renderer fulfilling either the ARAPlaybackRenderer or the ARAEditorRenderer role.

Instances of either subclass are constructed by the DocumentController.

Member Enumeration Documentation

◆ AlwaysNonRealtime

enum class ARARenderer::AlwaysNonRealtime
strong
Enumerator
no 
yes 

Constructor & Destructor Documentation

◆ ~ARARenderer()

virtual ARARenderer::~ARARenderer ( )
virtualdefault

Member Function Documentation

◆ prepareToPlay()

virtual void ARARenderer::prepareToPlay ( double sampleRate,
int maximumSamplesPerBlock,
int numChannels,
AudioProcessor::ProcessingPrecision precision,
AlwaysNonRealtime alwaysNonRealtime = AlwaysNonRealtime::no )
virtual

Initialises the renderer for playback.

Parameters
sampleRateThe sample rate that will be used for the data that is sent to the renderer
maximumSamplesPerBlockThe maximum number of samples that will be in the blocks sent to process() method
numChannelsThe number of channels that the process() method will be expected to handle
precisionThis should be the same as the result of getProcessingPrecision() for the enclosing AudioProcessor
alwaysNonRealtimeyes if this renderer is never used in realtime (e.g. if providing data for views only)

◆ releaseResources()

virtual void ARARenderer::releaseResources ( )
virtual

Frees render resources allocated in prepareToPlay().

◆ reset()

virtual void ARARenderer::reset ( )
virtual

Resets the internal state variables of the renderer.

◆ processBlock() [1/2]

virtual bool ARARenderer::processBlock ( AudioBuffer< float > & buffer,
AudioProcessor::Realtime realtime,
const AudioPlayHead::PositionInfo & positionInfo )
pure virtualnoexcept

Renders the output into the given buffer.

Returns true if rendering executed without error, false otherwise.

Parameters
bufferThe output buffer for the rendering. ARAPlaybackRenderers will replace the sample data, while ARAEditorRenderer will add to it.
realtimeIndicates whether the call is executed under real time constraints. The value of this parameter may change from one call to the next, and if the value is yes, the rendering may fail if the required samples cannot be obtained in time.
positionInfoCurrent song position, playback state and playback loop location. There should be no need to access the bpm, timeSig and ppqPosition members in any ARA renderer since ARA provides that information with random access in its model graph.

Returns false if non-ARA fallback rendering is required and true otherwise.

Implemented in ARAEditorRenderer, and ARAPlaybackRenderer.

◆ processBlock() [2/2]

virtual bool ARARenderer::processBlock ( AudioBuffer< double > & buffer,
AudioProcessor::Realtime realtime,
const AudioPlayHead::PositionInfo & positionInfo )
virtualnoexcept

Renders the output into the given buffer.

Returns true if rendering executed without error, false otherwise.

Parameters
bufferThe output buffer for the rendering. ARAPlaybackRenderers will replace the sample data, while ARAEditorRenderer will add to it.
realtimeIndicates whether the call is executed under real time constraints. The value of this parameter may change from one call to the next, and if the value is yes, the rendering may fail if the required samples cannot be obtained in time.
positionInfoCurrent song position, playback state and playback loop location. There should be no need to access the bpm, timeSig and ppqPosition members in any ARA renderer since ARA provides that information with random access in its model graph.

Returns false if non-ARA fallback rendering is required and true otherwise.

Reimplemented in ARAEditorRenderer, and ARAPlaybackRenderer.


The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram