The hum is almost certainly caused by the method of connecting the ausio equipment to your PC. Its nothing software related or down to the operating system.
As a generalisation all leads must be screened. Its also possible you have what is termed a "ground loop".
Do you get this hum if you use a battery powered device as an audio source component ?