[SDL] SDL_Mixer lag

Ryan C. Gordon icculus at icculus.org
Fri Sep 1 01:23:44 PDT 2006

> Hi, I know that this question has been answered before but I didn't quite
> understand the answer. I'm having the same problem with the marc marm (the
> one who asked this question before). Peter Mulholland answered that the
> problem was the backend that was used (ESD or Arts). Well, I don't know
> what ESD or Arts is. I don't even know what a backend or a frontend is. :P
> My question is how do I choose the backend for SDL_Mixer?
> BTW, I'm using Fedora Core 5 with KDE.

KDE uses arts, Gnome uses esound.

In some cases, arts/esound is hogging your sound card (even if it's not 
making any sound at the moment, or ever), which prevents other apps from 
using it. The idea is that every app feeds sound data to arts, which 
mixes it and sends it to the sound card, so no one has to hog the device 
but arts itself.

This is a terrible idea, though, largely because it adds a ton of delay 
and inefficiency to the equasion.

If the sound card will let multiple processes use it simultaneously, you 
can tell SDL to use a different backend. Backends are the lowlevel part 
of SDL that actually feeds the audio data to the hardware. The backend 
takes care of the specific details so the rest of the system (from the 
rest of SDL to the app on up to the user) don't generally have to care 
about _how_ the audio gets played, just that it does.

On Linux, there are several different backends, for various device 
driver interfaces, plus these things like arts, etc.

Now that you have the background information, here are the answers to 
your questions:

Disabling esd and arts:

Choosing a specific SDL backend:
   (you probably want "alsa" ... but killing artsd is probably enough)


More information about the SDL mailing list