JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::dsp::ProcessContextReplacing< ContextSampleType > Struct Template Reference

Contains context information that is passed into an algorithm's process method. More...

#include <juce_ProcessContext.h>

Collaboration diagram for juce::dsp::ProcessContextReplacing< ContextSampleType >:

Public Types

using AudioBlockType = AudioBlock< SampleType >
 The type of audio block that this context handles. More...
 
using ConstAudioBlockType = AudioBlock< const SampleType >
 
using SampleType = ContextSampleType
 The type of a single sample (which may be a vector if multichannel). More...
 

Public Member Functions

 ProcessContextReplacing (AudioBlockType &block) noexcept
 Creates a ProcessContextReplacing that uses the given audio block. More...
 
 ProcessContextReplacing (const ProcessContextReplacing &)=default
 
 ProcessContextReplacing (ProcessContextReplacing &&)=default
 
const ConstAudioBlockTypegetInputBlock () const noexcept
 Returns the audio block to use as the input to a process function. More...
 
AudioBlockTypegetOutputBlock () const noexcept
 Returns the audio block to use as the output to a process function. More...
 

Static Public Member Functions

static constexpr bool usesSeparateInputAndOutputBlocks ()
 All process context classes will define this constant method so that templated code can determine whether the input and output blocks refer to the same buffer, or to two different ones. More...
 

Public Attributes

bool isBypassed = false
 If set to true, then a processor's process() method is expected to do whatever is appropriate for it to be in a bypassed state. More...
 

Private Attributes

ConstAudioBlockType constBlock { ioBlock }
 
AudioBlockTypeioBlock
 

Detailed Description

template<typename ContextSampleType>
struct juce::dsp::ProcessContextReplacing< ContextSampleType >

Contains context information that is passed into an algorithm's process method.

This context is intended for use in situations where a single block is being used for both the input and output, so it will return the same object for both its getInputBlock() and getOutputBlock() methods.

See also
ProcessContextNonReplacing

@tags{DSP}

Member Typedef Documentation

◆ AudioBlockType

template<typename ContextSampleType >
using juce::dsp::ProcessContextReplacing< ContextSampleType >::AudioBlockType = AudioBlock<SampleType>

The type of audio block that this context handles.

◆ ConstAudioBlockType

template<typename ContextSampleType >
using juce::dsp::ProcessContextReplacing< ContextSampleType >::ConstAudioBlockType = AudioBlock<const SampleType>

◆ SampleType

template<typename ContextSampleType >
using juce::dsp::ProcessContextReplacing< ContextSampleType >::SampleType = ContextSampleType

The type of a single sample (which may be a vector if multichannel).

Constructor & Destructor Documentation

◆ ProcessContextReplacing() [1/3]

template<typename ContextSampleType >
juce::dsp::ProcessContextReplacing< ContextSampleType >::ProcessContextReplacing ( AudioBlockType block)
inlinenoexcept

Creates a ProcessContextReplacing that uses the given audio block.

Note that the caller must not delete the block while it is still in use by this object!

◆ ProcessContextReplacing() [2/3]

template<typename ContextSampleType >
juce::dsp::ProcessContextReplacing< ContextSampleType >::ProcessContextReplacing ( const ProcessContextReplacing< ContextSampleType > &  )
default

◆ ProcessContextReplacing() [3/3]

template<typename ContextSampleType >
juce::dsp::ProcessContextReplacing< ContextSampleType >::ProcessContextReplacing ( ProcessContextReplacing< ContextSampleType > &&  )
default

Member Function Documentation

◆ getInputBlock()

template<typename ContextSampleType >
const ConstAudioBlockType& juce::dsp::ProcessContextReplacing< ContextSampleType >::getInputBlock ( ) const
inlinenoexcept

Returns the audio block to use as the input to a process function.

References juce::dsp::ProcessContextReplacing< ContextSampleType >::constBlock.

◆ getOutputBlock()

template<typename ContextSampleType >
AudioBlockType& juce::dsp::ProcessContextReplacing< ContextSampleType >::getOutputBlock ( ) const
inlinenoexcept

Returns the audio block to use as the output to a process function.

References juce::dsp::ProcessContextReplacing< ContextSampleType >::ioBlock.

◆ usesSeparateInputAndOutputBlocks()

template<typename ContextSampleType >
static constexpr bool juce::dsp::ProcessContextReplacing< ContextSampleType >::usesSeparateInputAndOutputBlocks ( )
inlinestaticconstexpr

All process context classes will define this constant method so that templated code can determine whether the input and output blocks refer to the same buffer, or to two different ones.

Member Data Documentation

◆ constBlock

template<typename ContextSampleType >
ConstAudioBlockType juce::dsp::ProcessContextReplacing< ContextSampleType >::constBlock { ioBlock }
private

◆ ioBlock

template<typename ContextSampleType >
AudioBlockType& juce::dsp::ProcessContextReplacing< ContextSampleType >::ioBlock
private

◆ isBypassed

template<typename ContextSampleType >
bool juce::dsp::ProcessContextReplacing< ContextSampleType >::isBypassed = false

If set to true, then a processor's process() method is expected to do whatever is appropriate for it to be in a bypassed state.

Referenced by juce::dsp::ProcessorChain< Processors >::processOne().


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