[SDL] SDL_Mixer lag

benang at cs.its.ac.id benang at cs.its.ac.id
Fri Sep 1 20:05:22 PDT 2006

> 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:
>    http://icculus.org/lgfaq/#esdarts
> Choosing a specific SDL backend:
>    http://icculus.org/lgfaq/#setthatdriver
>    (you probably want "alsa" ... but killing artsd is probably enough)
> --ryan.

Thanks alot. So basically I just have to add this line, right?

system("export SDL_AUDIODRIVER=alsa");

More information about the SDL mailing list