There are two types of gunshot sounds for many weapons, one Normal sound, and one Distant sound for when NPCs shoot from further away. The transition from Normal to Distant is bugged however, as you can hear here.
What I think is supposed to happen is that as distance increases the Distant sound blends in while the Normal sound fades out, but what actually happens is that the Distant sound does not start playing until the Normal sound is completely silent.
This causes a gap at a certain distance where the gunfire is near silent, and then suddenly goes louder suddenly when you move further away from the shooter.
I hope Obsidian will have a look at this for the next patch.
