WindowedSincInterpolator stalls with approximatelyEqual change

The change of the WindowedSincInterpolator stalls the process call:

if (approximatelyEqual (sincPosition, 0.0f))
    result += inputs[samplePosition];
else if (sincPosition < floatCrossings && sincPosition > -floatCrossings)
    result += inputs[samplePosition] * windowedSinc (firstFrac, index);

We run the interpolators with a resamplingRatio of 0.91874999999999996 (playback of 44.1 kHz on 48 kHz).
I worked butter smooth on 7.0.3, but misses the deadline every block on the latest.
Reverting that line or using exactlyEqual fixes the issue.

I am still trying to wrap my head around why. I guess something denormals related.

The problem is less pronounced in release mode, but I can reproduce the problem on Windows and Mac (M2 Max MacBook)

Seems to be up to 10-20x slower.

I’ve merged this change in, thanks for reporting.


Awesome! Thank you @anthony-nicholls for the quick response.

1 Like