34template <
typename FloatType,
typename Function = FloatType (*) (FloatType)>
37 Function functionToUse;
45 template <
typename SampleType>
52 template <
typename ProcessContext>
55 if (context.isBypassed)
57 if (context.usesSeparateInputAndOutputBlocks())
58 context.getOutputBlock().copyFrom (context.getInputBlock());
63 context.getOutputBlock(),
68 void reset() noexcept {}
72#if ! ((JUCE_MAC || JUCE_IOS) && JUCE_CLANG && __clang_major__ < 10)
73template <
typename Functor>
76template <
typename Functor>
static void process(AudioBlock< Src1SampleType > inBlock, AudioBlock< Src2SampleType > outBlock, FunctionType &&function)
Applies a function to each value in an input block, putting the result into an output block.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
This structure is passed into a DSP algorithm's prepare() method, and contains information about vari...
Applies waveshaping to audio samples as single samples or AudioBlocks.
void prepare(const ProcessSpec &) noexcept
Called before processing starts.
SampleType JUCE_VECTOR_CALLTYPE processSample(SampleType inputSample) const noexcept
Returns the result of processing a single sample.
void process(const ProcessContext &context) const noexcept
Processes the input and output buffers supplied in the processing context.