Looks like it's a hardware problem
Yes.
if it was coming from an input would it be constant and unvarying?
No. If it is a bad mic, that could generate the kinds of noise you're hearing (although that wouldn't change with video activity). Open audio inputs could be picking up electrical noise leaking from video circuitry. That's why the cheap test of shorting them out to eliminate this as a candidate. If that works, you could solve your problem without finding the defect causing the leakage--just leave unused inputs shorted out. Also as a test, I would disconnect all audio inputs at the computer end just to rule out that a bad cable is acting as an antenna.
There's no noise in safe mode but then there's no sound of any kind, same as muting the volume.
Forgot about that. I'll have to think about a simple way to keep sound enabled but disable all other extraneous software sources to verify that the problem is hardware. It might be possible to do something like boot in safe mode and then manually activate the additional drivers and services needed for basic sound. That's usually tricky if you can do it at all because there are dependencies and they would need to be activated in the right order so each one has everything it needs to load.
It may be a combination of different causes
Even though you can modify or reduce the noise by disabling various software, my guess is that you are just affecting the symptoms. There is probably a single underlying hardware-based cause.
It doesn't seem easy to narrow it down to any specific device without replacing them one by one to see if the noise stops (I have no spares).
I'm guessing there are only a couple of things that are the likely culprit. Your video circuitry is top of the list. If it is on a separate physical card, you could swap it as a test, but that typically isn't the case except on laptops. The other is the motherboard.
Could the noise be from a drain on the power as the processor or video kicks in to make the the changes seen on the screen?
It's probably not being caused by the output of the power supply but I suppose it's possible that a defective capacitor in the power supply could be allowing the power pathways to serve as a conduit for electrical noise from another source. The odds are low for two simultaneous, unrelated hardware problems.
Or maybe it's on the video card itself creating interference somehow, maybe to the sound circuitry through the power rails or by radiation?
That's the most likely explanation.
How could you prove it by completely disabling the video card such that you can still see the screen to be able to enable it again afterwards? Even if the noise does go off with the video disabled, does that prove that the video card is the source? It could be just a link in a chain.
I believe video circuitry must be present to boot up. You could do something like add a PCI video card. As long as the existing video circuitry is receiving power, you could well still get noise if that is the cause, but if it is not processing the video signal, the noise wouldn't vary with the video content. That would be a smoking gun.