I have a Raspberry Pi 3, with AdvMAME 1.4 installed on it. This was an upgrade from an older Pi B.

On the older Pi B, only a few games worked, but the sound was fine.

On the new Pi 3, I find that in all games, the sound is lagging slightly behind the video. The accumulated lag gets greater and greater, until the Pi crashes - presumably because the sound buffer has overrun.

My question is, why is the sound apparently coming out at a different rate to the game, and what can I do about it?

  • I don't have the chip overclocked
  • I have dtparam=audio=on in the config.txt
  • Playing sounds form the commandline works
  • In the advmame.rc, I have device_sound=alsa, sound_normalize=yes and have not overridden the samplerate
  • The laggy sound problem happens with all games
  • Is there a particular reason you are using AdvMame? I have been using mainly lr-mame2003 and a couple of the other lr versions on Retropie with no issues on multiple Pi3's.
    – kenjara
    Mar 19, 2018 at 12:44
  • No particular reason, but I now have a certain amount of work invested in configuring it and do not want to change unless I have to. I also suspect the issue may be with the OS and not necessarily advmame Mar 22, 2018 at 1:48
  • I've installed Retropie on a separate SD card, and the sound works perfectly in that. I've not seen anything obvious different in the settings for either the OS or MAME that might have caused the lag. So I have a working solution, but I guess I'm curious as to why this happened, for future reference... Apr 2, 2018 at 22:34

1 Answer 1


Check the audio settings in the advmame.rc.
Set debug_rawsound yes

  • Sorry, but that does not really explain or solve the issue, though it gives a potential direction for investigation. Really, to qualify as an answer rather than a comment, you need to have an explanation and a solution. This would probably have been better as a comment. Aug 3, 2019 at 8:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .