For both swimming and track events, each starting block has a speaker to broadcast the gun sound. In the 2012 Olympics, the starting gun was replaced with a fully electronic device.[1]
Ah, cool, thanks for filling me in on that. The fact that the organizers indeed go to that length/expense to remove the ~0.02s advantage a swimmer would otherwise have due to the speed of sound makes it even stranger to me that they'd accept a 3cm difference between lanes, which seems to have an order of magnitude larger effect in long races (per OP's calculations).
I'd also wonder if there isn't some advantage/disadvantage to being one of the two swimmers on either end (#1 or #8) versus any of the others (#2-7) which each have two swimmers on either side of them. I have no idea which way the effect would go, but it would seem to me that there must be some effect at the level of hundredths or thousandths of seconds. Edit: seems there's indeed an advantage to being in the inner lanes, and they account for it by seeding [1]. (This was probably well known to anyone who pays any attention to or knows anything about competitive swimming at all. :)
1. http://www.theatlantic.com/technology/archive/2012/07/the-sp...