Why add delay to the closer path?
Sound on the shorter path would arrive earlier when the outputs start together. The calculated delay offsets that travel-time difference.
Compare two sound paths to the same listening or measurement point. Calculate how much delay to add to the shorter path in a timing estimate.
Measure from each source to the same point. Divide the absolute difference in distance by the speed of sound and multiply by 1,000 for milliseconds. The calculation identifies which path is shorter.
The air estimate scales 331.3 m/s at 0 °C by the square root of absolute temperature relative to 273.15 K. Actual sound speed also varies with conditions. Enter a measured or chosen speed when one is available.
Sound on the shorter path would arrive earlier when the outputs start together. The calculated delay offsets that travel-time difference.
The result represents travel time only. Measure and account for signal processing or device latency separately if it matters for your setup.