How it is calculated
speed of sound ≈ 331.3 + 0.606 × temperature in °C (meters per second)
delay = distance ÷ speed of sound
This matters in practice for long-lens shots with an on-camera microphone, for a slate clapped far from the camera, at concerts and wherever several microphones at different distances record the same source. From about one frame of offset the sound looks visibly out of sync.