I had the same problem after connecting a USB sound card to RetroPie using mame4all on a Raspberry Pi 3. Here's what I did to fix:
1) Create a /etc/asound.conf file with the following contents:
2) Create a /etc/modprobe.d/alsa-base.conf file with the following contents:
options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835
3) In /boot/config.txt, make sure the following lines appear somewhere:
4) Last but not least, run your games in 640x480 mode!
Do this by hitting 'Enter' after starting a game from the RetroPie menu, which brings up a menu of options. Select a default video mode of 640x480 for mame4all. You only need to do this one time.
For me, using the USB sound card was done in an attempt to get rid of a bunch of pops and clicks I was getting (had heard this was a common problem, and using USB card would fix it). But ultimately, I don't think using the USB sound card is absolutely necessary. I was able to use the RPi3's sound output port cleanly simply by running in 640x480 mode, plus putting the disable_audio_dither=1 line in /boot/config.txt.
But I do have a USB card and am using it, and like it.