Mercurial > sdl-ios-xcode
diff src/audio/dummy/SDL_dummyaudio.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/dummy/SDL_dummyaudio.c Tue Oct 17 08:04:51 2006 +0000 +++ b/src/audio/dummy/SDL_dummyaudio.c Tue Oct 17 09:09:21 2006 +0000 @@ -25,42 +25,27 @@ /* Output audio to nowhere... */ -#include "SDL_rwops.h" -#include "SDL_timer.h" #include "SDL_audio.h" -#include "../SDL_audiomem.h" #include "../SDL_audio_c.h" #include "SDL_dummyaudio.h" -/* The tag name used by DUMMY audio */ -#define DUMMYAUD_DRIVER_NAME "dummy" - -static int -DUMMYAUD_Available(void) -{ - return 1; /* always available. */ -} - static int DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture) { return 1; /* always succeeds. */ } - static int DUMMYAUD_Init(SDL_AudioDriverImpl *impl) { /* Set the function pointers */ impl->OpenDevice = DUMMYAUD_OpenDevice; impl->OnlyHasDefaultOutputDevice = 1; - return 1; } AudioBootStrap DUMMYAUD_bootstrap = { - DUMMYAUD_DRIVER_NAME, "SDL dummy audio driver", - DUMMYAUD_Available, DUMMYAUD_Init, 1 + "dummy", "SDL dummy audio driver", DUMMYAUD_Init, 1 }; /* vi: set ts=4 sw=4 expandtab: */