64 void setEnabled (
bool newValue)
noexcept { enabled = newValue; }
81 template <
typename ProcessContext>
82 void process (
const ProcessContext& context)
noexcept
84 const auto& inputBlock = context.getInputBlock();
85 auto& outputBlock = context.getOutputBlock();
86 const auto numInChannels = inputBlock.getNumChannels();
87 const auto numOutChannels = outputBlock.getNumChannels();
88 const auto numSamples = outputBlock.getNumSamples();
90 jassert (inputBlock.getNumSamples() == numSamples);
92 outputBlock.copyFrom (inputBlock);
94 if (! enabled || context.isBypassed)
97 if (numInChannels == 1 && numOutChannels == 1)
99 reverb.
processMono (outputBlock.getChannelPointer (0), (
int) numSamples);
101 else if (numInChannels == 2 && numOutChannels == 2)
104 outputBlock.getChannelPointer (1),
Performs a simple reverb effect on a stream of audio data.
void processMono(float *const samples, const int numSamples) noexcept
Applies the reverb to a single mono channel of audio data.
void reset()
Clears the reverb's buffers.
void processStereo(float *const left, float *const right, const int numSamples) noexcept
Applies the reverb to two stereo channels of audio data.
void setParameters(const Parameters &newParams)
Applies a new set of parameters to the reverb.
const Parameters & getParameters() const noexcept
Returns the reverb's current parameters.
void setSampleRate(const double sampleRate)
Sets the sample rate that will be used for the reverb.
Processor wrapper around juce::Reverb for easy integration into ProcessorChain.
const Parameters & getParameters() const noexcept
Returns the reverb's current parameters.
void process(const ProcessContext &context) noexcept
Applies the reverb to a mono or stereo buffer.
bool isEnabled() const noexcept
Returns true if the reverb is enabled.
Reverb()=default
Creates an uninitialised Reverb processor.
void setEnabled(bool newValue) noexcept
Enables/disables the reverb.
void setParameters(const Parameters &newParams)
Applies a new set of parameters to the reverb.
void reset() noexcept
Resets the reverb's internal state.
void prepare(const juce::dsp::ProcessSpec &spec)
Initialises the reverb.
Holds the parameters being used by a Reverb object.
double sampleRate
The sample rate that will be used for the data that is sent to the processor.
This structure is passed into a DSP algorithm's prepare() method, and contains information about vari...