Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: GaryMcT on September 06, 2009, 01:25:31 am

Title: Help me fix my Mame audio latency! :)
Post by: GaryMcT on September 06, 2009, 01:25:31 am
Is anyone here able to set audio_latency to 1 in Mame without vsync and get a completely smooth experience with the AC97 audio chipset?  I mention without vsync so that the issue doesn't get polluted with problems with monitor refresh rates not matching game refresh rate, etc.  I can only get down to audio_latency 2 and avoid issues, but the latency is pretty noticeable to me.

On a related note, if you are able to get down to audio_latency 1 without any audio glitches, please let me know what soundcard you are using.  I may have to invest in a sound card if there is one that can consistently make this better.

Thanks!
Gary
Title: Re: Mame audio latency and AC97 audio chipset?
Post by: Ummon on September 08, 2009, 11:25:46 pm
I've always had the latency at '1' on this rig - '05 Asus board running a P4 2.8 and XP - whether using the onboard for the last two years, or recently on an old SB live 5.1 card I put in. If you have to go that route, these cards are like ten bucks on ebay.
Title: Re: Mame audio latency and AC97 audio chipset?
Post by: GaryMcT on September 08, 2009, 11:46:15 pm
Awesome!  I'll give an SB Live a try and see how that works.  I may even have one of those around here already somewhere.
Title: Re: Help me fix my Mame audio latency! :)
Post by: GaryMcT on September 09, 2009, 03:09:55 am
Tried an SB Live of some sort.  With auto_latency set to 1, I'm more likely to get overflows instead of underflows.  What do you get if you run mspacmnf with no vsync, and -verbose?  After a shortish games, I get:

Sound: buffer overflows=12 underflows=2

which means that Mame is more often than not writing too fast to the audio buffer when it messed up.

Ideas?
Title: Re: Help me fix my Mame audio latency! :)
Post by: protokatie on September 09, 2009, 05:39:57 am
I may be wrong, but when you run MAME with no Vsync you will run into audio problems (even if not noticed) regardless of what hardware and settings you use. Actually, if you run a game at a refresh rate any different from the game's intended refresh you should encounter some audio mismatches. Most arcade systems (like earlier consoles) had the gfx refresh and audio timing closely matched, so any deviation of this will cause you the potential headache you are seeing.

Best bet is to run MAME using Vsync and have your monitor set to the same refresh rate (or have mame do no skip frames) as the game. I may have missed the point you are trying to get at tho, but I see no reason to run a game using "no vsync" unless you need to squeeze a few more FPS out of it.
Title: Re: Help me fix my Mame audio latency! :)
Post by: GaryMcT on September 10, 2009, 02:32:39 am
Running without vsync enabled should remove audio problems since the app is actually able to time frames at exactly the same refresh rate as the original game instead having the frames tied to the monitor's refresh rate.  The only time it's going to work properly with vsync is when you are able to get the refresh rate of your monitor to exactly match the refresh rate of the original game, which doesn't happen all that often under Windows.  Pac-Man is ~60.60 fps, not 60 fps, for instance.

Given all that, even if I do run a game  at exactly 60 Hz that is original 60 Hz (1942), I still get overflows.


Title: Re: Help me fix my Mame audio latency! :)
Post by: Ummon on September 12, 2009, 03:24:30 am
Dude, I don't know whether I can help you sort this out, but I say send me a message with your number and a time to call (I prefer evenings, and remember I'm Pacific time), and we can work on it in real-time an all.