I built a cabinet for pimame using minipac and happ joysticks and a DVI monitor. All great but when I use analog audio a lot of games I try have garbled audio that is not present when I connect same Pi to HDMI monitor with sound. I followed other FAQs but no improvement
I had this initially and believe it's when the Pi is heavily loaded the sound suffers. This also happened when using a separate USB sound card.
Switching to Mame4all pretty much fixed this.
One other thing I did was update to the latest firmware as there have been fixes related to the sound. The commands I used were: 1) sudo apt-get install git-core 2) sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
Then, to update your firmware, just run the following command: