to exclude an ground (or earth) loop problem https://en.wikipedia.org/wiki/Ground_loop_(electricity)
It is not uncommon for 'coil whine' to be picked up by your computers audio card. It's not uncommon that KSP envokes coil whine more then other games do. I had an coil whine in KSP while with other games, it never even caught my attention.
Also, when a computer gets older, and maybe even when it gathers a whole lot of dust inside, coil whine could be getting worse.
Try booting up KSP without speakers or headset connected, put your ears as close to the PC as you can get, opening the case and disconnecting fans (except for the CPU fan) is even better, and see if you hear that noises is in your PC to.
Here is a good read to, I still suspect either PSU, mainboard or Graphics card. http://www.tomshardware.co.uk/answers/id-2743256/high-pitch-whistling-coming-sound-systems-coil-whine.html