Mercurial > sdl-ios-xcode
diff src/audio/dma/SDL_dmaaudio.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/dma/SDL_dmaaudio.c Fri Oct 06 04:16:11 2006 +0000 +++ b/src/audio/dma/SDL_dmaaudio.c Fri Oct 06 04:46:58 2006 +0000 @@ -62,18 +62,6 @@ #define OPEN_FLAGS_INPUT (O_RDWR|O_NONBLOCK) #define OPEN_FLAGS_OUTPUT (O_RDWR|O_NONBLOCK) -/* Audio driver functions */ -static int DMA_DetectDevices(int iscapture); -static const char *DMA_GetDeviceName(int index, int iscapture); -static int DMA_OpenDevice(_THIS, const char *devname, int iscapture); -static void DMA_WaitDevice(_THIS); -static void DMA_PlayDevice(_THIS); -static Uint8 *DMA_GetDeviceBuf(_THIS); -static void DMA_CloseDevice(_THIS); -static void DMA_Deinitialize(void); - -/* Audio driver bootstrap functions */ - static char **outputDevices = NULL; static int outputDeviceCount = 0; static char **inputDevices = NULL; @@ -138,29 +126,6 @@ return available; } - -static int -DMA_Init(SDL_AudioDriverImpl *impl) -{ - /* Set the function pointers */ - impl->DetectDevices = DMA_DetectDevices; - impl->GetDeviceName = DMA_GetDeviceName; - impl->OpenDevice = DMA_OpenDevice; - impl->WaitDevice = DMA_WaitDevice; - impl->PlayDevice = DMA_PlayDevice; - impl->GetDeviceBuf = DMA_GetDeviceBuf; - impl->CloseDevice = DMA_CloseDevice; - impl->Deinitialize = DMA_Deinitialize; - - build_device_lists(); - return 1; -} - -AudioBootStrap DMA_bootstrap = { - DMA_DRIVER_NAME, "OSS /dev/dsp DMA audio", - DMA_Available, DMA_Init, 0 -}; - static void DMA_Deinitialize(void) { free_device_lists(); @@ -557,4 +522,26 @@ } } +static int +DMA_Init(SDL_AudioDriverImpl *impl) +{ + /* Set the function pointers */ + impl->DetectDevices = DMA_DetectDevices; + impl->GetDeviceName = DMA_GetDeviceName; + impl->OpenDevice = DMA_OpenDevice; + impl->WaitDevice = DMA_WaitDevice; + impl->PlayDevice = DMA_PlayDevice; + impl->GetDeviceBuf = DMA_GetDeviceBuf; + impl->CloseDevice = DMA_CloseDevice; + impl->Deinitialize = DMA_Deinitialize; + + build_device_lists(); + return 1; +} + +AudioBootStrap DMA_bootstrap = { + DMA_DRIVER_NAME, "OSS /dev/dsp DMA audio", + DMA_Available, DMA_Init, 0 +}; + /* vi: set ts=4 sw=4 expandtab: */