Here’s a file that could use some comments explaining the strategy. I need to understand it as we need a fancier one ![]()
One small coding style point:
if (numSamples == numSamplesCached
&& numChannelsCached == numChans
&& startTime == cachedStart
&& timePerPixel == cachedTimePerPixel
&& ! cacheNeedsRefilling)
{
return ! cacheNeedsRefilling;
}
Just ‘return false’ might do?
But my substantial question is:
if (refillCache (area.getWidth(), startTime, endTime, rate,
numChans, sampsPerThumbSample, levelData, chans)
&& isPositiveAndBelow (channelNum, numChannelsCached))
{
// draw stuff
}
Is returning false an error condition because it just draws nothing in this case?
