So I've got a new desktop pre-built from CyberPowerPC (Like 2 weeks ago) running Windows 8.1. And so there's been Audio crackling when I'm playing music on ITunes, Spotify, Youtube, etc. But I noticed when I would run a game (BF4, BF3, GTA IV, etc. it would stop and so I did some tests and so I started playing some music (Crackly at this point) and then started up Minecraft and watched the CPU Performance and noticed that if it went above like 12-15% it would go crystal clear but as soon as I quit MC or any other game or program it would go crackly again.
Here the Specs:
Intel i7-4820k 3.7 GHz
EVGA GTX 770 ACX 2gb
2TB SATA III 6GB/s 7200 rpm
Realtek Audio - Version 126.96.36.19983 & Onboard 7.1 Sound
Could be your speakers or headphones, I would get a cheap USB soundcard and see if that fixes it. If it does, you can continue using that, return the motherboard, or get a nicer internal soundcard. http://www.newegg.com/Product/Product.aspx?Item=N82E168... That will work for testing it, might even be better than onboard.
Sounds like its either the Sound Drivers or the Sound Codecs. Try installing a Codec pack such as Klite. Download the Standard Pack. Make sure you select the audio codecs during the installation. See if that helps.
The order I would follow (assuming you've tested the speakers, with another device, and unplugged/replugged the speaker wires leading to the sound card):
1. Update drivers, test.
2. Download Codecs, test.
3. Install another Sound card (if you have one)
4. Reinstall Windows
5. It's the Motherboard. Contact your motherboard manufacturer for warranty details (RMA).