Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Help me fix my Mame audio latency! :)  (Read 8551 times)

0 Members and 1 Guest are viewing this topic.

GaryMcT

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 745
  • Last login:September 24, 2014, 11:19:27 am
    • GaryMcT's arcade blog
Help me fix my Mame audio latency! :)
« 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
« Last Edit: September 09, 2009, 03:08:14 am by GaryMcT »
My blog on learning how to develop FPGA versions of arcade boards: http://garymct.blogspot.com


Ummon

  • Trade Count: (+13)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5244
  • Last login:June 09, 2010, 06:37:18 pm
Re: Mame audio latency and AC97 audio chipset?
« Reply #1 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.
Yo. Chocolate.


"Theoretical physics has been the most successful and cost-effective in all of science."

Stephen Hawking


People often confuse expressed observations with complaint, ridicule, or - even worse - self-pity.

GaryMcT

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 745
  • Last login:September 24, 2014, 11:19:27 am
    • GaryMcT's arcade blog
Re: Mame audio latency and AC97 audio chipset?
« Reply #2 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.
My blog on learning how to develop FPGA versions of arcade boards: http://garymct.blogspot.com


GaryMcT

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 745
  • Last login:September 24, 2014, 11:19:27 am
    • GaryMcT's arcade blog
Re: Help me fix my Mame audio latency! :)
« Reply #3 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?
My blog on learning how to develop FPGA versions of arcade boards: http://garymct.blogspot.com


protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: Help me fix my Mame audio latency! :)
« Reply #4 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.
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

GaryMcT

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 745
  • Last login:September 24, 2014, 11:19:27 am
    • GaryMcT's arcade blog
Re: Help me fix my Mame audio latency! :)
« Reply #5 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.


My blog on learning how to develop FPGA versions of arcade boards: http://garymct.blogspot.com


Ummon

  • Trade Count: (+13)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5244
  • Last login:June 09, 2010, 06:37:18 pm
Re: Help me fix my Mame audio latency! :)
« Reply #6 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.
Yo. Chocolate.


"Theoretical physics has been the most successful and cost-effective in all of science."

Stephen Hawking


People often confuse expressed observations with complaint, ridicule, or - even worse - self-pity.