diff src/audio/dma/SDL_dmaaudio.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 103bbe13f5eb
children
line wrap: on
line diff
--- a/src/audio/dma/SDL_dmaaudio.c	Tue Oct 17 08:04:51 2006 +0000
+++ b/src/audio/dma/SDL_dmaaudio.c	Tue Oct 17 09:09:21 2006 +0000
@@ -116,15 +116,6 @@
     free_device_list(&inputDevices, &inputDeviceCount);
 }
 
-static int
-DMA_Available(void)
-{
-    int available = 0;
-    build_device_lists();
-    available = ((outputDeviceCount > 0) || (inputDeviceCount > 0));
-    free_device_lists();
-    return available;
-}
 
 static void DMA_Deinitialize(void)
 {
@@ -537,8 +528,7 @@
 }
 
 AudioBootStrap DMA_bootstrap = {
-    DMA_DRIVER_NAME, "OSS /dev/dsp DMA audio",
-    DMA_Available, DMA_Init, 0
+    DMA_DRIVER_NAME, "OSS /dev/dsp DMA audio", DMA_Init, 0
 };
 
 /* vi: set ts=4 sw=4 expandtab: */