[AD] install_sound in grabber

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


While playing MP3s, the grabber won't run, because install_sound
failure causes the program to exit.  I've changed it (already in
CVS) so that it just brings up an alert box and installs the
dummy sound drivers.  Here's the patch:

diff -u -r1.4 grabber.c
--- tools/grabber.c	2000/08/12 10:51:23	1.4
+++ tools/grabber.c	2000/08/24 14:17:15
@@ -3055,9 +3055,8 @@
    }
    else {
       if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL)
!= 0) {
-	 set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
-	 allegro_message("Error initialising sound\n%s\n", allegro_error);
-	 return 1;
+	 alert ("Error initialising sound", allegro_error, NULL, "OK", NULL, 0,
0);
+	 install_sound(DIGI_NONE, MIDI_NONE, NULL);
       }
    }
 
End of diff -- include that line above this one with only a
space in it.

George

-- 
Random project update:
22/06/2000: AllegroGL alpha 8 released at http://allegrogl.sourceforge.net/
        Improved Windows support.  New directory structure.
        Fixed OpenGL coding mistake in `tex.c'.



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