I'm developing an arcade cabinet with my Raspberry Pi, but I'm running into some problems regarding sound. When I try to play an MP3 file with omxplayer (omxplayer -o local music.mp3), it sounds very good. However, when I try to do it with any other program or library (mpg321 or libmpg123) I get a lot of static and very faintly in the background I can hear the music or sound playing. Is there any way to play sounds properly without OMXPlayer as I haven't been able to find a C API for it.

I'm using a Raspberry Pi B+ and the analog audio output.

  • Hello and welcome. While I am not sure whether it might matter, could you please specify which Pi you're using and which audio output is used (I guess the analogue one)? – Ghanima Jan 9 '16 at 16:16
  • Sorry, forgot to add it to my post – Dirk Jan 9 '16 at 16:17
  • No answer will be good enough. The rpi sound is intended for basic activity. External sound card is highly advised. White noise created by power noise and cpu interference. – fcm Jan 9 '16 at 20:24
  • Could you perhaps recommend an external sound card for usage with the raspberry pi? – Dirk Jan 9 '16 at 20:25
  • There are many USB Sound options, often less than us$ 5. There are a few caveats to run them but but sound is much better. You can add a few capacitors on your RPI to reduce the noise, but the solution is not 'portable'. – fcm Jan 9 '16 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.