I’m calling jlimit in void drawNextLineOfSpectrogram() as I found it in the tutorial,
but I am getting the error “No matching function call to jlimit”.
I see it defined in juce_core/maths/juce_MathFunctions.h
I’m also calling jmin and jmax and they are working fine. He is my code:
for (auto y = 1; y < imageHeight; ++y)
{
auto skewedProportionY = 1.0f - std::exp (std::log (y / (float) imageHeight) * 0.2f);
auto fftDataIndex = jlimit (0, fftSize, (int) (skewedProportionY * fftSize));
auto level = jmap (phase[fftDataIndex], 0.0f, jmax (maxLevel.getEnd(), 1e-5f), 0.0f, 1.0f);
spectrogramImage.setPixelAt (rightHandEdge, y, Colour::fromHSV (level, 1.0f, level, 1.0f));
}
Please if someone call tell me why the compiler is not seeing the jlimit definition that would be great. Thanks.
