Hey Guys!, I’m new to juce and was following the tutorials on the juce website to making a synthesizer, for the renderNextblock() what exactly is numSamples?
void renderNextBlock (AudioSampleBuffer& outputBuffer, int startSample, int numSamples) override
{
if (duration != 0.0)
{
if (tailOff > 0)
{
while (--numSamples >= 0)
{
const float currentSample = setOscTypeWithTailOff();
for (int i = outputBuffer.getNumChannels(); --i >= 0;)
outputBuffer.addSample (i, startSample, currentSample);
phaseAngle += duration;
++startSample;
tailOff *= 0.99;
if (tailOff <= 0.005)
{
clearCurrentNote();
time = 0.0;
}
}
}
else
{
while (--numSamples >= 0)
{
const float currentSample = setOscType();
for (int i = outputBuffer.getNumChannels(); --i >= 0;)
outputBuffer.addSample (i, startSample, currentSample);
phaseAngle += duration;
++startSample;
}
}
}
}
```