Why does my sound lag in MAME on the Raspberry Pi?
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
Best Answer
Check the audio settings in the advmame.rc.
Set debug_rawsound yes
Pictures about "Why does my sound lag in MAME on the Raspberry Pi?"
How to get rid of the lag in MAME
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Craig Dennis, Javon Swaby, Egor Komarov, Ann H