Loop doesn't line up

I don’t understand why timing isn’t exactly correct:

use_bpm 60
print sample_duration(:loop_mika, rate: 2, release: 1, sustain: 1)
print sample_duration(:drum_tom_hi_hard, rate: 2, release: 0.1, sustain: 0.1)
live_loop :flibble do
sample :loop_mika, rate: 2, release: 1, sustain: 1
sample :drum_tom_hi_hard, amp: 0.8, sustain: 0.1, release: 0.1
sleep 2
end

It seems, since the sample length of the edited loop_mika is 2, and drum_tom_hi_hard < 2, that every period of 2 seconds should be identical. But this is not the case, it sounds like a discordant overlap – why?

Edit:
There’s something really wierd with my Mac download where things that should line up don’t.

use_bpm 60

live_loop :drumloop do
sample :loop_amen, beat_stretch: 1
sleep 1
end

Also has some overlapping in my Bluetooth headphones, but clearly it shouldn’t. Any ideas?

Edit: Discussion on Github here: Timing doesn't align · Issue #3187 · sonic-pi-net/sonic-pi · GitHub

If you don’t use the bluetooth earphones what is it like then? Reset your output to the internal speakers and restart Sonic Pi. The code works as expected on my iMac with version 4.0.3 (the latest).
I suspect It may be something to do with your audio setup.

EDIT have you looked at the sonic-pi logs at all to see if there is anything untoward there? The are in your <home folder>/.sonic-pi/log I see you have posted this on github too. Better to continue this there.