Echo distance

from Red Blob Games
26 Apr 2022

Be sure this page has microphone permissions and turn volume all the way up

I wanted to see if I could emit a sound and measure its echo. The problem is that it seems to measure in 0.1-0.3 sec on my mac, which means maybe there’s just some latency I can’t avoid. But I need to compare it to a longer distance echo and see what happens.

I’m trying to print the time between the sound and the first time I heard a sound.

Output: