Audio noise on Rpi playing mp3

I am running some samples (mp3 320 kbps 44.100Hz) on a raspberry pi model B+ v 1.2 running Raspbian version 7 and using OF 08.04.
The app runs ok but as soon as it opens there is a lot of white noise from the audio channels, not very high volume that you cannot hear the samples, but still enough to make the samples not usable as the overall quality is very low.
The original samples are ok, as I’ve checked on another machine. I also checked the same samples on the raspberry pi using omxplayer. On OmxPlayer they play much better (still with some noise though).
Did anyone experienced something similar before and can give some hint?
Not sure if this is a hardware problem (then why omxplayer plays better?) or the encoder that OF uses? or a problem with my code perhaps? or a general issue with audio channels on Rpi? No idea…
I am not particularly expert in audio channels and Rpi to be honest, so any help would be great.

I keep on looking online in the meanwhile…
thank you!

It may be useful saying that I am using an ofSoundPlayer()

Since today I have installed OF 098 on a Jessie Raspbian as suggested in the most recent guide on OF website. Hoping the problem was with my old version of OF.
I am encountering some other problems that are reported in another post open some time ago by someone else.
Besides that, I tested the audio output with a couple of players and the quality seems the same.
I will keep on trying… in the meanwhile if any good soul has a thought… I am all ears! :slight_smile:

I cannot find the article, but i read the raspberry pi hasn’t a true ADC converter, the audio output is simulated via pwm, so it is a bit noisy/lo-fi. For a better quality you should output the audio via hdmi or use a usb audio card.

@npisanti thanks for replying.
that would make sense. Also for the noise that I hear.

I tested it on a tv with HDMI and actually the audio is fine.
Also from some other resources they confirm what you say and they suggest to use this

or similar

if you want a cheaper solution also a 5$ usb audio card could be fine:

literally just bought it! it should be here tomorrow and I am curious to see how good it is!

the 5$ audio card is ok. It works for what I have to do. I doubt that could be a good option for some quality audio though.
I might be able to test the Pi-DAC on Monday and see if that’s somehow better.

oook, then let us know about the comparison =)