I hope this isn't just another one of the "Audio on my pi 2 model B is bad" threads but I'm sorry if it is. Like many people I struggled with the poor audio quality of the analogue connector. The amount of noise/static was so terrible that you could barely hear the actual audio.
Eventually, I found that if you added "audio_pwm_mode=2" to the config.txt the noise was reduced to an acceptable level. However, after changing the pwm mode all output is suddenly distorted. It sounds like someone has "slowed it down". (ie think of the audio in a slow-mo video) Despite the horrific quality, the audio played at the normal pitch/speed before changing the pwm mode. Also, the issue happens on every audio player I tried and goes away if I remove "audio_pwm_mode=2". (but the noise comes back)
Any help is appreciated! Thanks