@Christoph-Hart After doing a bunch of testing, I've found that the magic number appears to be 48.
When I do the math:
auto numSamples = (double)getMainController()->getOriginalBufferSize();
auto sampleRate = (double)getMainController()->getOriginalSamplerate();
auto blockLengthSeconds = numSamples / sampleRate;
auto deltaForBypassDetection = roundToInt(1000.0 * 48.0 * blockLengthSeconds);
buffer = 64
sample rate = 48000
1000 * 48 * blockLengthSeconds = 64
Is it a coincidence that the magic number is equal to the buffer size of my audio card or that the value is a multiple of my sample rate?
Now the part that is driving me crazy....
Even with the increased sampling time, I can get the transport handler to trigger false positives when I move an item on my screen. Check out the console:
false positive.gif
It appears to not only be affected by the buffer, but also the way getApproximateMillisecondCounter is being calculated.