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: HOW TO: Stop SDLMAME / MAME on Linux freezing on exit - Ubuntu  (Read 20732 times)

0 Members and 1 Guest are viewing this topic.

Silas (son of Silas)

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 524
  • Last login:August 08, 2022, 08:37:03 am
HOW TO: Stop SDLMAME / MAME on Linux freezing on exit - Ubuntu
« on: November 06, 2009, 12:29:45 pm »
For a few months now I have struggled with 3 separate Ubuntu desktops running SDLMAME that all refused to cleanly exit SDLMAME when I hit escape. Problem solved

If SDLMAME freezes, hangs, crashes or pauses when you try to exit SDLMAME fire up a terminal and type:

Quote
sudo apt-get install libsdl1.2debian-pulseaudio

Tested working on Intrepid, Jaunty and Karmic

SDL (Simple DirectMedia Layer) is a library that allows programs low level access to a video framebuffer, audio output, mouse, and keyboard. Installing libsdl1.2debian-pulseaudio is SDL but with added X11 and PulseAudio options. Since SDLMAME is using PulseAudio to handle the sound in games this package adds the relevant code to correctly handle the audio requests between SDL and Pulseaduldio.

A nice 'bonus' of installing this package is that you can play music from another app in the background (say Rhythmbox) at the same time as playing SDLMAME games without that annoying glitching sound that tends to occur by default without affecting the game audio.

Edited to add more detail for those that want to know why it works rather than just how to fix the problem.

Edited again to add:
This also works for MAME 0.136u1 and newer on Linux. As of 0.136u1 SDLMAME became part of the main MAME release and is no longer a separate offshoot.
« Last Edit: February 22, 2010, 08:53:52 am by Silas (son of Silas) »
" ਜਿਹੜਾ ਲਾਓ ਜਰਦਾ ਉਹ ਸੌ ਸਾਲ ਨੰਈ ਮਰਦਾ " (he who chews tobacco would live to be a hundred )

My Project MAME clone
Who is Silas?

HaRuMaN

  • Supreme Solder King
  • Global Moderator
  • Trade Count: (+45)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 10327
  • Last login:Yesterday at 07:37:53 pm
  • boom
    • Arcade Madness
Re: HOW TO: Stop SDLMAME freezing on exit - Ubuntu
« Reply #1 on: November 06, 2009, 12:57:13 pm »
Oooh thanks for this...

saurian333

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 284
  • Last login:June 10, 2014, 07:58:21 pm
  • "They must've spent tens of dollars on this."
    • My b(uild)log
Re: HOW TO: Stop SDLMAME freezing on exit - Ubuntu
« Reply #2 on: January 06, 2010, 11:25:22 pm »
THANK YOU!

Saw this yesterday, and it worked great.  When I saw that it was a PulseAudio package, I presumed it would help with some of my audio issues as well as the crashing...and it did!

I think this should fix the lag problem I have with xmame-sdl as well.  SDLMame is better and up-to-date, but I have a much older machine that needs an older version of MAME, and XMame is running well on it, aside from the lag.  On a Debian machine with ALSA and no PulseAudio, it works fine, but with PulseAudio, it lags even on my Core2.  I'll try it within the next few days and post results.

[ EDIT = slight addition ]
« Last Edit: January 06, 2010, 11:28:37 pm by saurian333 »

elvis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1154
  • Last login:April 13, 2023, 05:31:03 pm
  • penguin poker
    • StickFreaks
Re: HOW TO: Stop SDLMAME / MAME on Linux freezing on exit - Ubuntu
« Reply #3 on: November 07, 2010, 07:45:04 am »
PulseAudio is a dog.   I disable it in GNOME and switch to ALSA instead, and gain 10-15% CPU performance.

To do so, in Ubuntu do the following:

1) Right-click on "Applications", and select "Edit Menus"

2) Scroll to System -> Preferences,  tick "Multimedia Systems Selector", and click "close"

3) Now click System -> Preferences -> Multimedia Systems Selector.  Change your output plugin to ALSA.  This will fix MAME, and give you your performance back.
« Last Edit: November 07, 2010, 07:49:42 am by elvis »