Even worse, you may not hear it coming as there are all sorts of things in an urban environment that serve to absorb or distort sound. Having your windows up and the air conditioner or the heater running, noise produced by traffic, wind, the distance from the shooter to you, buildings, all are working against you. And what really compounds the problem is that you are going to be up against a high-powered rifle. That means shooter accuracy goes up as well as stopping power and lethality. And your pistol-rated body armor will do you little good.
What this can mean for the officer in this situation is that attack recognition usually takes place when the rounds start to smack the patrol vehicle, penetrating metal and glass. If you are not moving you need to start. If you are already moving, you need to move faster. And as soon as you can, find a side street, park, or parking lot, and make a hard turn at right angles to your direction of travel and away from the direction of fire. This serves to instantly put buildings between you and the sniper, blocking his view of you.
Unconventional Weapons
Before I move on to the worst-case scenarios, I'd like to mention the Molotov cocktail as another type of weapon that has been used in police vehicle ambushes.
At one time Motorola (now Calibre Press) produced an excellent little film titled "Vehicle Under Attack," which dealt with the problem of Molotovs against vehicles. Basically, it showed that if you can keep the burning gasoline out of the car by having your windows up, you can accelerate away from the attack and force the gas on the outside of the vehicle to quickly burn itself out. This kind of attack is scary as hell but survivable.