diff src/audio/disk/SDL_diskaudio.c @ 3846:66fb40445587 SDL-ryan-multiple-audio-device

Removed distinction between "available" and "init" in audio backends, since both had to be checked for success as a pair at the higher level and several of the Available methods were just always-succeed placeholders anyhow. Now the availability check is done in the init code, and the higher level tries all possible drivers until one manages to initialize successfully.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 17 Oct 2006 09:09:21 +0000
parents 9d070c1a45fa
children
line wrap: on
line diff
--- a/src/audio/disk/SDL_diskaudio.c	Tue Oct 17 08:04:51 2006 +0000
+++ b/src/audio/disk/SDL_diskaudio.c	Tue Oct 17 09:09:21 2006 +0000
@@ -57,13 +57,6 @@
     return devname;
 }
 
-/* Audio driver bootstrap functions */
-static int
-DISKAUD_Available(void)
-{
-    return 1;  /* always available. */
-}
-
 /* This function waits until it is possible to write a full sound buffer */
 static void
 DISKAUD_WaitDevice(_THIS)
@@ -158,9 +151,6 @@
 static int
 DISKAUD_Init(SDL_AudioDriverImpl *impl)
 {
-    /* Initialize all variables that we clean on shutdown */
-    SDL_memset(impl, '\0', sizeof (SDL_AudioDriverImpl));
-
     /* Set the function pointers */
     impl->OpenDevice = DISKAUD_OpenDevice;
     impl->WaitDevice = DISKAUD_WaitDevice;
@@ -172,8 +162,7 @@
 }
 
 AudioBootStrap DISKAUD_bootstrap = {
-    DISKAUD_DRIVER_NAME, "direct-to-disk audio",
-    DISKAUD_Available, DISKAUD_Init, 1
+    DISKAUD_DRIVER_NAME, "direct-to-disk audio", DISKAUD_Init, 1
 };
 
 /* vi: set ts=4 sw=4 expandtab: */