Hey JUCE!
(Inside an Audio Plugin project)
Ran into an assertion that you said to let you know about:
#if JUCE_DEBUG
// trying to add a timer that's already here - shouldn't get to this point,
// so if you get this assertion, let me know!
jassert (! timerExists (t));
#endif
I’m not sure which specifics you’d like me to share, but basically, I have a Component with a Timer that redraws at a variable FPS.
The FPS is updated when the block size/ sample rate changes.
here is the function:
void EnvelopeView::setSampleRateAndBlockSize(float srate, int newBlockSize)
{
if (sampleRate != srate || blockSize != newBlockSize)
{
stopTimer();
// ... determine FPS (<50) based on sampleRate ...
startTimer(1000.0 / ceil(FPS));
//^^
// Assertion when altering buffer size in DAW. However, on first call, no problems.
}
}
