I’ve had this annoying problem with sound starting to crackle when I was typing intensively enough. It didn’t matter what was the app making the sound, foobar and flash-based video sites such as Youtube were equally afflicted or more accurately, the problem was with the sound (as if it were a drivers-related problem) and not with any individual app. After the sound began to crackle in one app, it would crackle everywhere (that is, killing the app and starting another wouldn’t solve it), and only a log-out, log-in would restore it back to normal.
I just got fed up with this after having to log out and back in for the third time within half an hour, so I went gooling for solutions and found this:
I had the same problem with my Terratec on a nForce2 based motherboard. It crackled when i started typing and also many times during games. So i read somewhere that this could be caused by my keyboard and that i should try an USB keyboard instead of PS/2… and it worked!
My keyboard is a USB one, but I’d plugged it into the PS/2 port through an adapter. So I took the adapter out an plugged the keyboard into a USB port, and sure enough, typing no longer seems to affect the sound at all!