If you heard it without being hit it probably wasn't aimed at you. Aside from the "bang" from the actual firearm, if you hear a distinctive "snap" the bullet passed near you and the shooter may have been aiming in your direction. In that case ducking may prevent a second shot from hitting you.