129 void process (
const ProcessContext& context)
noexcept
132 auto&& outBlock = context.getOutputBlock();
133 auto&& inBlock = context.getInputBlock();
136 jassert (outBlock.getNumSamples() <=
static_cast<size_t> (rampBuffer.
size()));
138 auto len = outBlock.getNumSamples();
139 auto numChannels = outBlock.getNumChannels();
140 auto inputChannels = inBlock.getNumChannels();
143 if (context.isBypassed)
144 context.getOutputBlock().clear();
150 for (
size_t i = 0; i < len; ++i)
154 if (! context.isBypassed)
158 if (context.usesSeparateInputAndOutputBlocks())
160 for (ch = 0; ch < jmin (numChannels, inputChannels); ++ch)
162 auto* dst = outBlock.getChannelPointer (ch);
163 auto* src = inBlock.getChannelPointer (ch);
165 for (
size_t i = 0; i < len; ++i)
166 dst[i] = src[i] + generator (buffer[i]);
171 for (ch = 0; ch < jmin (numChannels, inputChannels); ++ch)
173 auto* dst = outBlock.getChannelPointer (ch);
175 for (
size_t i = 0; i < len; ++i)
176 dst[i] += generator (buffer[i]);
180 for (; ch < numChannels; ++ch)
182 auto* dst = outBlock.getChannelPointer (ch);
184 for (
size_t i = 0; i < len; ++i)
185 dst[i] = generator (buffer[i]);
194 if (context.isBypassed)
196 frequency.
skip (
static_cast<int> (len));
203 if (context.usesSeparateInputAndOutputBlocks())
205 for (ch = 0; ch < jmin (numChannels, inputChannels); ++ch)
208 auto* dst = outBlock.getChannelPointer (ch);
209 auto* src = inBlock.getChannelPointer (ch);
211 for (
size_t i = 0; i < len; ++i)
217 for (ch = 0; ch < jmin (numChannels, inputChannels); ++ch)
220 auto* dst = outBlock.getChannelPointer (ch);
222 for (
size_t i = 0; i < len; ++i)
227 for (; ch < numChannels; ++ch)
230 auto* dst = outBlock.getChannelPointer (ch);
232 for (
size_t i = 0; i < len; ++i)