Is it from the computer or in the headphones?
Sometimes muting the mic input(and any others you are not using) can fix this(in the playback section not recording).
Another thing to try may be enabling vsync as it can lighten the load on the system.
Also, with the iPhone earbuds, If they have 2 rings(+ the tip and sleeve) vs the 1 on a normal headphone set, it may cause issues(distortion on some mp3 players for example.), but should not cause this issue.