Help! My PC audio / speakers / headphones keep cutting out randomly!

UPDATE 2021: updated answer on Neoscroll

I had this problem too, and fixed it. I have a Gigabyte motherboard, and my headphones are connected to the green audio jack on the back of the motherboard.

My audio started to randomly cut out every ~30 seconds. The issue was that the front audio jacks on my PC were damaged, and my Realtek HD Audio Manager detected fake/phantom new inputs from those damaged ports. To fix this, you need to disable the front ports from being detected. Here is how to do that:

1) Find the Realtek audio program
Realtek HD Audio Manager GUI

2) Go to the options panel and disable front panel detection:

That's it, my problem is totally fixed.