diff src/audio/disk/SDL_diskaudio.c @ 3798:c8b3d3d13ed1 SDL-ryan-multiple-audio-device

Audio bootstraps can now specify that a driver is only to be used if explicitly requested (for things like the "disk" driver that is always available but you would never want to default to using). Trimmed out code that can be handled by stubs in the core. The "dummy" driver is pretty damned small now. :)
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 04 Oct 2006 21:27:53 +0000
parents 866c310e2cb5
children ef7f7be318da
line wrap: on
line diff
--- a/src/audio/disk/SDL_diskaudio.c	Wed Oct 04 20:42:39 2006 +0000
+++ b/src/audio/disk/SDL_diskaudio.c	Wed Oct 04 21:27:53 2006 +0000
@@ -64,13 +64,7 @@
 static int
 DISKAUD_Available(void)
 {
-    /* !!! FIXME: check this at a higher level... */
-    /* only ever use this driver if explicitly requested. */
-    const char *envr = SDL_getenv("SDL_AUDIODRIVER");
-    if (envr && (SDL_strcasecmp(envr, DISKAUD_DRIVER_NAME) == 0)) {
-        return (1);
-    }
-    return (0);
+    return 1;  /* always available. */
 }
 
 static int
@@ -91,7 +85,7 @@
 
 AudioBootStrap DISKAUD_bootstrap = {
     DISKAUD_DRIVER_NAME, "direct-to-disk audio",
-    DISKAUD_Available, DISKAUD_Init
+    DISKAUD_Available, DISKAUD_Init, 1
 };
 
 /* This function waits until it is possible to write a full sound buffer */