Mercurial > sdl-ios-xcode
diff src/audio/disk/SDL_diskaudio.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 | 7852b5b78af5 |
children | 66fb40445587 |
line wrap: on
line diff
--- a/src/audio/disk/SDL_diskaudio.c Fri Oct 06 04:16:11 2006 +0000 +++ b/src/audio/disk/SDL_diskaudio.c Fri Oct 06 04:46:58 2006 +0000 @@ -45,13 +45,6 @@ #define DISKENVR_WRITEDELAY "SDL_DISKAUDIODELAY" #define DISKDEFAULT_WRITEDELAY 150 -/* Audio driver functions */ -static int DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture); -static void DISKAUD_WaitDevice(_THIS); -static void DISKAUD_PlayDevice(_THIS); -static Uint8 *DISKAUD_GetDeviceBuf(_THIS); -static void DISKAUD_CloseDevice(_THIS); - static const char * DISKAUD_GetOutputFilename(const char *devname) { @@ -71,27 +64,6 @@ return 1; /* always available. */ } -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; - impl->PlayDevice = DISKAUD_PlayDevice; - impl->GetDeviceBuf = DISKAUD_GetDeviceBuf; - impl->CloseDevice = DISKAUD_CloseDevice; - - return 1; -} - -AudioBootStrap DISKAUD_bootstrap = { - DISKAUD_DRIVER_NAME, "direct-to-disk audio", - DISKAUD_Available, DISKAUD_Init, 1 -}; - /* This function waits until it is possible to write a full sound buffer */ static void DISKAUD_WaitDevice(_THIS) @@ -183,4 +155,25 @@ return 1; } +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; + impl->PlayDevice = DISKAUD_PlayDevice; + impl->GetDeviceBuf = DISKAUD_GetDeviceBuf; + impl->CloseDevice = DISKAUD_CloseDevice; + + return 1; +} + +AudioBootStrap DISKAUD_bootstrap = { + DISKAUD_DRIVER_NAME, "direct-to-disk audio", + DISKAUD_Available, DISKAUD_Init, 1 +}; + /* vi: set ts=4 sw=4 expandtab: */