[AD] ESD patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I fixed the ESD driver last night, so it actually works now :P
The patch is attached.

Peter
-- 
tjaden@xxxxxxxxxx - http://www.psynet.net/~tjaden/
"What's in the box?"  "Pain."  -- Dune
diff -urN allegro-3.9.27/src/unix/uesd.c allegro/src/unix/uesd.c
--- allegro-3.9.27/src/unix/uesd.c	Sun Nov  7 18:51:44 1999
+++ allegro/src/unix/uesd.c	Tue Nov 16 00:26:20 1999
@@ -112,7 +112,7 @@
    timeout.tv_sec = 0;
    timeout.tv_usec = 0;
 
-   if (select(_al_esd_fd, &rfds, &wfds, &efds, &timeout) == -1)
+   if (select(_al_esd_fd+1, &rfds, &wfds, &efds, &timeout) == -1)
       return;
 
    if (FD_ISSET(_al_esd_fd, &wfds)) {
@@ -146,7 +146,7 @@
    /* Try to open ESD server.  */
    fd = esd_open_sound(uconvert_toascii(server, s));
    if (fd < 0) {
-      usprintf(allegro_error, get_config_text("%s: can not open"), server);
+      usprintf(allegro_error, get_config_text("%s: can not open"), (server[0] ? server : "No server"));
       return FALSE;
    }
 
@@ -183,7 +183,7 @@
    _al_esd_rate = get_config_int(uconvert_ascii("sound", tmp1),
 				 uconvert_ascii("esddigi_rate", tmp2),
 				 ESD_DEFAULT_RATE);
-   _al_esd_signed = 0;
+   _al_esd_signed = 1;
 
    if (_al_esd_bits != 16)
       _al_esd_bits = 8;
@@ -196,7 +196,7 @@
    _al_esd_fd = esd_play_stream_fallback(_al_esd_format, _al_esd_rate,
 					 uconvert_toascii(server, s), NULL);
    if (_al_esd_fd < 0) {
-      usprintf(allegro_error, get_config_text("%s: can not open"), server);
+      usprintf(allegro_error, get_config_text("%s: can not open"), (server[0] ? server : "No server"));
       return -1;
    }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/