Mercurial > sdl-ios-xcode
diff src/audio/esd/SDL_esdaudio.c @ 3816:9d070c1a45fa SDL-ryan-multiple-audio-device
Moved AudioBootstrap section in converted drivers to bottom of source, so I
could delete the predeclarations (one more thing to forget to update when
changing the API, otherwise). There're a few other cleanups that snuck into
this commit, too.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 06 Oct 2006 04:46:58 +0000 |
parents | 3234d6eee011 |
children | 66fb40445587 |
line wrap: on
line diff
--- a/src/audio/esd/SDL_esdaudio.c Fri Oct 06 04:16:11 2006 +0000 +++ b/src/audio/esd/SDL_esdaudio.c Fri Oct 06 04:46:58 2006 +0000 @@ -45,13 +45,6 @@ /* The tag name used by ESD audio */ #define ESD_DRIVER_NAME "esd" -/* Audio driver functions */ -static int ESD_OpenDevice(_THIS, const char *devname, int iscapture); -static void ESD_WaitDevice(_THIS); -static void ESD_PlayDevice(_THIS); -static Uint8 *ESD_GetDeviceBuf(_THIS); -static void ESD_CloseDevice(_THIS); - #ifdef SDL_AUDIO_DRIVER_ESD_DYNAMIC static const char *esd_library = SDL_AUDIO_DRIVER_ESD_DYNAMIC; @@ -122,8 +115,6 @@ #endif /* SDL_AUDIO_DRIVER_ESD_DYNAMIC */ -/* Audio driver bootstrap functions */ - static int ESD_Available(void) { @@ -144,26 +135,6 @@ } -static int -ESD_Init(SDL_AudioDriverImpl *impl) -{ - /* Set the function pointers */ - impl->OpenDevice = ESD_OpenDevice; - impl->PlayDevice = ESD_PlayDevice; - impl->WaitDevice = ESD_WaitDevice; - impl->GetDeviceBuf = ESD_GetDeviceBuf; - impl->CloseDevice = ESD_CloseDevice; - impl->OnlyHasDefaultOutputDevice = 1; - - return 1; -} - - -AudioBootStrap ESD_bootstrap = { - ESD_DRIVER_NAME, "Enlightened Sound Daemon", - ESD_Available, ESD_Init, 0 -}; - /* This function waits until it is possible to write a full sound buffer */ static void ESD_WaitDevice(_THIS) @@ -360,4 +331,25 @@ return 1; } + +static int +ESD_Init(SDL_AudioDriverImpl *impl) +{ + /* Set the function pointers */ + impl->OpenDevice = ESD_OpenDevice; + impl->PlayDevice = ESD_PlayDevice; + impl->WaitDevice = ESD_WaitDevice; + impl->GetDeviceBuf = ESD_GetDeviceBuf; + impl->CloseDevice = ESD_CloseDevice; + impl->OnlyHasDefaultOutputDevice = 1; + + return 1; +} + + +AudioBootStrap ESD_bootstrap = { + ESD_DRIVER_NAME, "Enlightened Sound Daemon", + ESD_Available, ESD_Init, 0 +}; + /* vi: set ts=4 sw=4 expandtab: */