Mercurial > sdl-ios-xcode
diff src/audio/dsp/SDL_dspaudio.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 | 2c5387c0a642 |
children | 103bbe13f5eb |
line wrap: on
line diff
--- a/src/audio/dsp/SDL_dspaudio.c Fri Oct 06 04:16:11 2006 +0000 +++ b/src/audio/dsp/SDL_dspaudio.c Fri Oct 06 04:46:58 2006 +0000 @@ -58,16 +58,6 @@ #define OPEN_FLAGS_OUTPUT (O_WRONLY|O_NONBLOCK) #define OPEN_FLAGS_INPUT (O_RDONLY|O_NONBLOCK) -/* Audio driver functions */ -static int DSP_DetectDevices(int iscapture); -static const char *DSP_GetDeviceName(int index, int iscapture); -static int DSP_OpenDevice(_THIS, const char *devname, int iscapture); -static void DSP_WaitDevice(_THIS); -static void DSP_PlayDevice(_THIS); -static Uint8 *DSP_GetDeviceBuf(_THIS); -static void DSP_CloseDevice(_THIS); -static void DSP_Deinitialize(void); - /* Audio driver bootstrap functions */ static char **outputDevices = NULL; @@ -116,29 +106,6 @@ } -static int -DSP_Init(SDL_AudioDriverImpl *impl) -{ - /* Set the function pointers */ - impl->DetectDevices = DSP_DetectDevices; - impl->GetDeviceName = DSP_GetDeviceName; - impl->OpenDevice = DSP_OpenDevice; - impl->PlayDevice = DSP_PlayDevice; - impl->GetDeviceBuf = DSP_GetDeviceBuf; - impl->CloseDevice = DSP_CloseDevice; - impl->Deinitialize = DSP_Deinitialize; - - build_device_lists(); - return 1; -} - - -AudioBootStrap DSP_bootstrap = { - DSP_DRIVER_NAME, "OSS /dev/dsp standard audio", - DSP_Available, DSP_Init, 0 -}; - - static void DSP_Deinitialize(void) { free_device_lists(); @@ -402,4 +369,26 @@ } } +static int +DSP_Init(SDL_AudioDriverImpl *impl) +{ + /* Set the function pointers */ + impl->DetectDevices = DSP_DetectDevices; + impl->GetDeviceName = DSP_GetDeviceName; + impl->OpenDevice = DSP_OpenDevice; + impl->PlayDevice = DSP_PlayDevice; + impl->GetDeviceBuf = DSP_GetDeviceBuf; + impl->CloseDevice = DSP_CloseDevice; + impl->Deinitialize = DSP_Deinitialize; + + build_device_lists(); + return 1; +} + + +AudioBootStrap DSP_bootstrap = { + DSP_DRIVER_NAME, "OSS /dev/dsp standard audio", + DSP_Available, DSP_Init, 0 +}; + /* vi: set ts=4 sw=4 expandtab: */