dsp::WaveShaper< FloatType, Function > Struct Template Reference

Applies waveshaping to audio samples as single samples or AudioBlocks. More...

Public Member Functions

void prepare (const ProcessSpec &) noexcept
 Called before processing starts. More...
 
template<typename SampleType >
SampleType JUCE_VECTOR_CALLTYPE processSample (SampleType inputSample) const noexcept
 Returns the result of processing a single sample. More...
 
template<typename ProcessContext >
void process (const ProcessContext &context) const noexcept
 Processes the input and output buffers supplied in the processing context. More...
 
void reset () noexcept
 

Public Attributes

Function functionToUse
 

Detailed Description

template<typename FloatType, typename Function = FloatType (*) (FloatType)>
struct dsp::WaveShaper< FloatType, Function >

Applies waveshaping to audio samples as single samples or AudioBlocks.

Member Function Documentation

◆ prepare()

template<typename FloatType , typename Function = FloatType (*) (FloatType)>
void dsp::WaveShaper< FloatType, Function >::prepare ( const ProcessSpec )
noexcept

Called before processing starts.

◆ processSample()

template<typename FloatType , typename Function = FloatType (*) (FloatType)>
template<typename SampleType >
SampleType JUCE_VECTOR_CALLTYPE dsp::WaveShaper< FloatType, Function >::processSample ( SampleType  inputSample) const
noexcept

Returns the result of processing a single sample.

References dsp::WaveShaper< FloatType, Function >::functionToUse.

◆ process()

template<typename FloatType , typename Function = FloatType (*) (FloatType)>
template<typename ProcessContext >
void dsp::WaveShaper< FloatType, Function >::process ( const ProcessContext &  context) const
noexcept

Processes the input and output buffers supplied in the processing context.

References dsp::WaveShaper< FloatType, Function >::functionToUse, jassert, and dsp::AudioBlock< SampleType >::process().

◆ reset()

template<typename FloatType , typename Function = FloatType (*) (FloatType)>
void dsp::WaveShaper< FloatType, Function >::reset ( )
noexcept

Member Data Documentation

◆ functionToUse

template<typename FloatType , typename Function = FloatType (*) (FloatType)>
Function dsp::WaveShaper< FloatType, Function >::functionToUse

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