[AD] ESD-autodetection fixed!? |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hi, some changes concerning autodetection of esound daemon. Problem: Autodetection was disabled in alunix.h Solution: Enable it. Problem2: Autodetection caused a freeze, probable reason: esdlib spawns esd [1] while we are making a test connection or a short time after it, while other drivers are probed. Solution: forbid esdlib to spawn esd, setting ESD_NO_SPAWN environment in uesd.c. Patch attached. [1] Auto-spawning eg. is enabled by default in Debian configuration when a soundcard is installed. The situation by other distributions may be the same. Greetings, Eduard. -- ===================================================================== Eduard Bloch <eb@xxxxxxxxxx>; HP: http://eduard.bloch.com/edecosi 0xEDF008C5(gpg): E6EB 98E2 B885 8FF0 6C04 5C1D E106 481E EDF0 08C5 ** > Herr, schmeiss Hirn vom Himmel... Das tut er schon, nur trifft es oft leider die Falschen. (Quelle unbekannt)
diff -u --recursive --new-file allegro-3.9.32.orig/include/allegro/alunix.h allegro-3.9.32/include/allegro/alunix.h --- allegro-3.9.32.orig/include/allegro/alunix.h Mon Mar 13 01:23:57 2000 +++ allegro-3.9.32/include/allegro/alunix.h Mon Mar 27 00:28:38 2000 @@ -83,7 +83,7 @@ AL_VAR(DIGI_DRIVER, digi_esd); #define DIGI_DRIVER_ESD \ - { DIGI_ESD, &digi_esd, FALSE }, + { DIGI_ESD, &digi_esd, TRUE }, #endif /* ALLEGRO_WITH_ESDDIGI */ diff -u --recursive --new-file allegro-3.9.32.orig/src/unix/uesd.c allegro-3.9.32/src/unix/uesd.c --- allegro-3.9.32.orig/src/unix/uesd.c Mon Mar 13 01:23:53 2000 +++ allegro-3.9.32/src/unix/uesd.c Mon Mar 27 00:29:43 2000 @@ -11,6 +11,7 @@ * ESD sound driver. * * By Michael Bukin. Bugfixes by Peter Wang. + * Autodetection bug fixed by Eduard Bloch. * * See readme.txt for copyright information. */ @@ -144,6 +145,9 @@ char *server; char tmp1[80], tmp2[80], tmp3[80]; char s[256]; + + /* we don't want esdlib to spawn esd while we are detecting it */ + setenv("ESD_NO_SPAWN","1",0); if (input) { usprintf(allegro_error, get_config_text("Input is not supported"));
Attachment:
pgpjugE1Nza5l.pgp
Description: PGP signature
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |