diff src/audio/macosx/SDL_coreaudio.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 1485d42cf1a0
children 29e83f221c62
line wrap: on
line diff
--- a/src/audio/macosx/SDL_coreaudio.c	Fri Oct 06 04:16:11 2006 +0000
+++ b/src/audio/macosx/SDL_coreaudio.c	Fri Oct 06 04:46:58 2006 +0000
@@ -201,20 +201,6 @@
     return 0;
 }
 
-
-/* Audio driver functions */
-
-static int COREAUDIO_DetectDevices(int iscapture);
-static const char *COREAUDIO_GetDeviceName(int index, int iscapture);
-static int COREAUDIO_OpenDevice(_THIS, const char *devname, int iscapture);
-static void COREAUDIO_WaitDevice(_THIS);
-static void COREAUDIO_PlayDevice(_THIS);
-static Uint8 *COREAUDIO_GetDeviceBuf(_THIS);
-static void COREAUDIO_CloseDevice(_THIS);
-static void COREAUDIO_Deinitialize(void);
-
-/* Audio driver bootstrap functions */
-
 static int
 COREAUDIO_Available(void)
 {
@@ -222,28 +208,6 @@
 }
 
 static int
-COREAUDIO_Init(SDL_AudioDriverImpl *impl)
-{
-    /* Set the function pointers */
-    impl->DetectDevices = COREAUDIO_DetectDevices;
-    impl->GetDeviceName = COREAUDIO_GetDeviceName;
-    impl->OpenDevice = COREAUDIO_OpenDevice;
-    impl->CloseDevice = COREAUDIO_CloseDevice;
-    impl->Deinitialize = COREAUDIO_Deinitialize;
-    impl->ProvidesOwnCallbackThread = 1;
-
-    build_device_lists();  /* do an initial check for devices... */
-
-    return 1;
-}
-
-AudioBootStrap COREAUDIO_bootstrap = {
-    "coreaudio", "Mac OS X CoreAudio",
-    COREAUDIO_Available, COREAUDIO_Init, 0
-};
-
-
-static int
 COREAUDIO_DetectDevices(int iscapture)
 {
     if (iscapture) {
@@ -601,4 +565,25 @@
     return 1;  /* good to go. */
 }
 
+static int
+COREAUDIO_Init(SDL_AudioDriverImpl *impl)
+{
+    /* Set the function pointers */
+    impl->DetectDevices = COREAUDIO_DetectDevices;
+    impl->GetDeviceName = COREAUDIO_GetDeviceName;
+    impl->OpenDevice = COREAUDIO_OpenDevice;
+    impl->CloseDevice = COREAUDIO_CloseDevice;
+    impl->Deinitialize = COREAUDIO_Deinitialize;
+    impl->ProvidesOwnCallbackThread = 1;
+
+    build_device_lists();  /* do an initial check for devices... */
+
+    return 1;
+}
+
+AudioBootStrap COREAUDIO_bootstrap = {
+    "coreaudio", "Mac OS X CoreAudio",
+    COREAUDIO_Available, COREAUDIO_Init, 0
+};
+
 /* vi: set ts=4 sw=4 expandtab: */