Re: power supply problem
Sounds more like an overheating problem to me. Try opening up the case and blowing an external fan into the case and see if it still turns off. Also, if the option is available, try running a utility that monitors temperatures--specifically processor, video card, and hard drive. The processor is probably the culprit if it is overheating. When you open the case, check for case thermometers. These can go defective and cause the computer to restart.
A telltale sign of overheating is this: if you leave it alone for a long time and it stays on for a while, but this when it turns off and you restart it, it turns off again almost right away.
The whining pitch is certainly some power supply, but not necessarily the computer one. It could be three different issues: a bad bearing on a fan, swelling/leaking capacitor, or coil whine. All three are a good reason to get a new PSU if it's the computer PSU. It may also just be the adapter for your speakers though, so check before ordering a new one.