Maybe. It depends on the circuit. FET switches usually have an RC (resistor/capacitor) circuit on the gate that turns it on over a period of a few milliseconds, preventing any sudden voltage transients. A mechanical switch can't do this, of course. The problem with putting a cap across the switch is that it may pass enough of the audio signal to be heard.