So what happened to your X-Fi?
Onboard audio can be prone to EMI. Meaning it picks up interference inside the case. EMI doesn't affect all onboard audio solutions, but it's more common than EMI affecting a sound card.
With a sound card, EMI shielding can be added, which may help. The sound card could possibly be moved to a slot furthest from the GFX card, or whatever may be the most likely source.
With onboard audio, there is nothing you can do really, except buy another sound card, although that depends on why you are no longer using the X-Fi, or buy an external sound device.