37template <
typename FloatType>
41 Gain()
noexcept =
default;
76 sampleRate =
spec.sampleRate;
84 gain.reset (sampleRate, rampDurationSeconds);
89 template <
typename SampleType>
92 return s * gain.getNextValue();
96 template <
typename ProcessContext>
106 auto numChannels =
inBlock.getNumChannels();
110 gain.skip (
static_cast<int> (
len));
112 if (
context.usesSeparateInputAndOutputBlocks())
118 if (numChannels == 1)
123 for (
size_t i = 0; i <
len; ++i)
124 dst[i] =
src[i] * gain.getNextValue();
128 auto*
gains =
static_cast<FloatType*
> (
alloca (
sizeof (FloatType) *
len));
130 for (
size_t i = 0; i <
len; ++i)
131 gains[i] = gain.getNextValue();
143 double sampleRate = 0, rampDurationSeconds = 0;
static void JUCE_CALLTYPE multiply(float *dest, const float *src, int numValues) noexcept
FloatType getGainDecibels() const noexcept
FloatType getGainLinear() const noexcept
void prepare(const ProcessSpec &spec) noexcept
double getRampDurationSeconds() const noexcept
bool isSmoothing() const noexcept
void setGainLinear(FloatType newGain) noexcept
SampleType JUCE_VECTOR_CALLTYPE processSample(SampleType s) noexcept
void process(const ProcessContext &context) noexcept
void setRampDurationSeconds(double newDurationSeconds) noexcept
void setGainDecibels(FloatType newGainDecibels) noexcept