Mailinglist Archive: opensuse-factory (464 mails)

< Previous Next >
[opensuse-factory] Re: Make SDL default ALSA device "hw" instead of "default"?
  • From: "Christian Morales Vega" <cmorve69@xxxxxxxx>
  • Date: Sun, 17 Feb 2008 20:23:02 +0100
  • Message-id: <8235e6f40802171123r4c904ebeq8b8bc389c692b45f@xxxxxxxxxxxxxx>
2008/2/17, Christian Morales Vega <cmorve69@xxxxxxxx>:
The SDL API doesn't allows the developer to select the audio device.
It just does:
#define DEFAULT_DEVICE "default"
...
static const char *get_audio_device(int channels)
{
const char *device;

device = SDL_getenv("AUDIODEV"); /* Is there a standard
variable name? */
if ( device == NULL ) {
if (channels == 6) device = "surround51";
else if (channels == 4) device = "surround40";
else device = DEFAULT_DEVICE;
}
return device;
}

I don't understand the motives (someone here does?), but setting
AUDIODEV to "hw" works better than "default" in some cases (sometimes
default works better?).
All the info about the problem I found is
http://mednafen.sourceforge.net/documentation/#using-cli , that says:
"This is necessary because ALSA's "default" audio device has very poor
buffering control capabilities."

I just found again the problem with GuitarFun (
http://www.elotrolado.net/hilo_-JUEGO--Guitarfun-PC-2-0--homebrew-_948414
). But I remember having the same problem in the past with other
software.

So, should SDL be patched to '#define DEFAULT_DEVICE "hw"'?


Ok, no. "hw" isn't a good default since it disables software mixing
and other apps loss sound.
But we are patching SDL to try first ALSA
(SDL-1.2.13-try_alsa_first.patch). And in my experience SDL apps work
better with: "SDL_AUDIODRIVER=dsp aoss <app>" than with
"SDL_AUDIODRIVER=alsa <app>".
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups