Mercurial > sdl-ios-xcode
diff src/audio/arts/SDL_artsaudio.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 | 8e1af9ff0e1f |
children | 66fb40445587 |
line wrap: on
line diff
--- a/src/audio/arts/SDL_artsaudio.c Fri Oct 06 04:16:11 2006 +0000 +++ b/src/audio/arts/SDL_artsaudio.c Fri Oct 06 04:46:58 2006 +0000 @@ -39,14 +39,6 @@ /* The tag name used by artsc audio */ #define ARTS_DRIVER_NAME "arts" -/* Audio driver functions */ -static int ARTS_OpenDevice(_THIS, const char *devname, int iscapture); -static void ARTS_WaitDevice(_THIS); -static void ARTS_PlayDevice(_THIS); -static Uint8 *ARTS_GetDeviceBuf(_THIS); -static void ARTS_CloseDevice(_THIS); -static void ARTS_WaitDone(_THIS); - #ifdef SDL_AUDIO_DRIVER_ARTS_DYNAMIC static const char *arts_library = SDL_AUDIO_DRIVER_ARTS_DYNAMIC; @@ -160,28 +152,6 @@ } -static int -ARTS_Init(SDL_AudioDriverImpl *impl) -{ - /* Set the function pointers */ - impl->OpenDevice = ARTS_OpenDevice; - impl->PlayDevice = ARTS_PlayDevice; - impl->WaitDevice = ARTS_WaitDevice; - impl->GetDeviceBuf = ARTS_GetDeviceBuf; - impl->CloseDevice = ARTS_CloseDevice; - impl->WaitDone = ARTS_WaitDone; - impl->OnlyHasDefaultOutputDevice = 1; - - return 1; -} - - -AudioBootStrap ARTS_bootstrap = { - ARTS_DRIVER_NAME, "Analog RealTime Synthesizer", - ARTS_Available, ARTS_Init, 0 -}; - - /* This function waits until it is possible to write a full sound buffer */ static void ARTS_WaitDevice(_THIS) @@ -370,4 +340,26 @@ return 1; } + +static int +ARTS_Init(SDL_AudioDriverImpl *impl) +{ + /* Set the function pointers */ + impl->OpenDevice = ARTS_OpenDevice; + impl->PlayDevice = ARTS_PlayDevice; + impl->WaitDevice = ARTS_WaitDevice; + impl->GetDeviceBuf = ARTS_GetDeviceBuf; + impl->CloseDevice = ARTS_CloseDevice; + impl->WaitDone = ARTS_WaitDone; + impl->OnlyHasDefaultOutputDevice = 1; + + return 1; +} + + +AudioBootStrap ARTS_bootstrap = { + ARTS_DRIVER_NAME, "Analog RealTime Synthesizer", + ARTS_Available, ARTS_Init, 0 +}; + /* vi: set ts=4 sw=4 expandtab: */