[SDL] SDL_Mixer lag

Christophe Cavalaria chris.cavalaria at free.fr
Sat Sep 2 02:21:43 PDT 2006


William Brodie-Tyrrell wrote:

> Stoned koala bears drooled eucalyptus spit in awe as
> benang at cs.its.ac.id said:
> 
>> Thanks alot. So basically I just have to add this line, right?
>> 
>> system("export SDL_AUDIODRIVER=alsa");
> 
> Or even better:
> 
> #include <stdlib.h>
> 
> setenv("SDL_AUDIODRIVER", "alsa", 1);
> 
> 
> Doing it your way means you're dependent on the user having a
> sh-compatible shell and makes some assumptions about environment
> handling.  Doing it with the proper setenv() call directly changes just
> your process' environment.

I have a better reason why you shouldn't use system : it won't work :D






More information about the SDL mailing list