43template <
typename FloatType>
47 Bias()
noexcept =
default;
55 jassert (
newBias >=
static_cast<FloatType
> (-1) &&
newBias <=
static_cast<FloatType
> (1));
75 double getRampDurationSeconds()
const noexcept {
return rampDurationSeconds; }
81 sampleRate =
spec.sampleRate;
87 bias.reset (sampleRate, rampDurationSeconds);
92 template <
typename SampleType>
100 template<
typename ProcessContext>
110 auto numChannels =
inBlock.getNumChannels();
114 bias.skip (
static_cast<int> (
len));
116 if (
context.usesSeparateInputAndOutputBlocks())
122 if (numChannels == 1)
127 for (
size_t i = 0; i <
len; ++i)
128 dst[i] =
src[i] + bias.getNextValue();
132 auto*
biases =
static_cast<FloatType*
> (
alloca (
sizeof (FloatType) *
len));
134 for (
size_t i = 0; i <
len; ++i)
135 biases[i] = bias.getNextValue();
148 double sampleRate = 0, rampDurationSeconds = 0;
153 bias.reset (sampleRate, rampDurationSeconds);
static void JUCE_CALLTYPE add(float *dest, float amountToAdd, int numValues) noexcept
FloatType getBias() const noexcept
void prepare(const ProcessSpec &spec) noexcept
SampleType processSample(SampleType inputSample) const noexcept
void setRampDurationSeconds(double newDurationSeconds) noexcept
void setBias(FloatType newBias) noexcept
void process(const ProcessContext &context) noexcept