Hi, I've been suffering from this typical crackling sound problem with Unreal Tournament GOTY (also SDL, also known as UT99) and many game console emulators for about a year now, but hadn't really looked into it yet. Today I was trying to get SDLMess to work on my Gutsy laptop (HP nx7400, C2D, integrated video (GMA950 aka Intel 945GM) and of course snd-hda-intel). Sound was garbled as usual and now I've come across this thread. I tried the workarounds but nothing helps (and export SDL_AUDIODRIVER=dsp doesn't play anything unfortunately, although /dev/dsp is available and osstest works fine) So I was now checking out some sdlmess option which disables the video output of the emulator... and all of a sudden the sound is perfect (using ALSA default)! How cool is that? (not very cool as I've got no video, but still) I've enabled verbose output and discovered a few peculiarities when comparing a game load with and without video (check the last two lines!): This is WITH video: $ mess -verbose Parsing mess.ini Parsing mess.ini Build version: 0.121u1 (Dec 8 2007) Build architecure: SDLMAME_ARCH= Build defines: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 LSB_FIRST=1 NDEBUG=1 SDL/OpenGL defines: SDL_COMPILEDVERSION=1211 USE_OPENGL=1 USE_DISPATCH_GL=1 Compiler defines A: __GNUC__=4 __GNUC_MINOR__=1 __GNUC_PATCHLEVEL__=3 __VERSION__="4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)" Compiler defines B: __unix__=1 __i386__=1 SDL Device Driver : x11 SDL Monitor Dimensions: 1680 x 1050 Using SDL single-window soft driver (SDL 1.2) Input: Adding Kbd #1: System keyboard Input: Adding Mouse #1: System mouse Joystick: Start initialization Joystick: End initialization Audio initialized - driver: alsa, frequency: 48000, channels: 2, samples: 2229 sdl_create_buffers: creating stream buffer of 57344 bytes Parsing mess.ini Parsing mess.ini Build version: 0.121u1 (Dec 8 2007) Build architecure: SDLMAME_ARCH= Build defines: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 LSB_FIRST=1 NDEBUG=1 SDL/OpenGL defines: SDL_COMPILEDVERSION=1211 USE_OPENGL=1 USE_DISPATCH_GL=1 Compiler defines A: __GNUC__=4 __GNUC_MINOR__=1 __GNUC_PATCHLEVEL__=3 __VERSION__="4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)" Compiler defines B: __unix__=1 __i386__=1 Using SDL single-window soft driver (SDL 1.2) Input: Adding Kbd #1: System keyboard Input: Adding Mouse #1: System mouse Joystick: Start initialization Joystick: End initialization Audio initialized - driver: alsa, frequency: 48000, channels: 2, samples: 2229 sdl_create_buffers: creating stream buffer of 57344 bytes Average speed: 83.57% (9 seconds) Sound buffer: overflows=0 underflows=216 $ And this is without: $ mess -verbose -video none Parsing mess.ini Parsing mess.ini Build version: 0.121u1 (Dec 8 2007) Build architecure: SDLMAME_ARCH= Build defines: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 LSB_FIRST=1 NDEBUG=1 SDL/OpenGL defines: SDL_COMPILEDVERSION=1211 USE_OPENGL=1 USE_DISPATCH_GL=1 Compiler defines A: __GNUC__=4 __GNUC_MINOR__=1 __GNUC_PATCHLEVEL__=3 __VERSION__="4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)" Compiler defines B: __unix__=1 __i386__=1 Warning: -video none doesn't make much sense without -seconds_to_run SDL Device Driver : x11 SDL Monitor Dimensions: 1680 x 1050 Using SDL single-window soft driver (SDL 1.2) Input: Adding Kbd #1: System keyboard Input: Adding Mouse #1: System mouse Joystick: Start initialization Joystick: End initialization Audio initialized - driver: alsa, frequency: 48000, channels: 2, samples: 2229 sdl_create_buffers: creating stream buffer of 57344 bytes Parsing mess.ini Parsing mess.ini Build version: 0.121u1 (Dec 8 2007) Build architecure: SDLMAME_ARCH= Build defines: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1 LSB_FIRST=1 NDEBUG=1 SDL/OpenGL defines: SDL_COMPILEDVERSION=1211 USE_OPENGL=1 USE_DISPATCH_GL=1 Compiler defines A: __GNUC__=4 __GNUC_MINOR__=1 __GNUC_PATCHLEVEL__=3 __VERSION__="4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)" Compiler defines B: __unix__=1 __i386__=1 Warning: -video none doesn't make much sense without -seconds_to_run Using SDL single-window soft driver (SDL 1.2) Input: Adding Kbd #1: System keyboard Input: Adding Mouse #1: System mouse Joystick: Start initialization Joystick: End initialization Audio initialized - driver: alsa, frequency: 48000, channels: 2, samples: 2229 sdl_create_buffers: creating stream buffer of 57344 bytes Average speed: 100.00% (15 seconds) $ (no line about overflows/underflows) Could this have something to do with overtaxing the system because of the integrated video? As you can see from the log, sdlmess uses my laptops native resolution (1680x1050) to display a 268x244 game resampled to that high resolution. Telling sdlmess to switch resolutions instead of interpolating, fixes my sound problem! Full screen, average speed 100% and perfect sound. I also tried enabling opengl but it doesn't seem to work on this Intel integrated chipset. Anyway, I tried this approach with my Unreal Tournament issue as well (same symptoms), but unfortunately the problem persisted at 320x240 resolution (=> different cause). What finally fixed this was putting the following line in /etc/modprobe.d/options and rebooting: options snd_hda_intel position_fix=1 (a tip I found here: http://ubuntuforums.org/showthread.php?t=329639&page=2 ) So apparently the UT problem was snd-hda-intel specific in my case and now this is fixed too! (must be my lucky day) Maybe this helps... maybe not. Greetings, Pascal P.S.: Other stuff I had temporarily installed prior to this success: - older versions of libsdl1.2debian-alsa from Dapper Drake and Breezy Badger (libsdl1.2debian-alsa_1.2.7+1.2.8cvs20041007-5.3ubuntu2_i386.deb and libsdl1.2debian-alsa_1.2.7+1.2.8cvs20041007-3ubuntu4_i386.deb) (now using the gutsy version again) - oss-compat (now removed again) - libsdl1.2debian-arts (replaces libsdl1.2debian-alsa; now removed again with "apt-get install libsdl1.2debian-alsa") So these aren't on my system anymore and things still sound good. You never know if uninstalling these left something behind though, so I thought I'd mention it.