test/testaudioinfo.c
changeset 3635 5ea5e4e6103f
parent 3338 9de326b3099c
child 5535 96594ac5fd1a
--- a/test/testaudioinfo.c	Sun Jan 10 18:25:04 2010 +0000
+++ b/test/testaudioinfo.c	Sun Jan 10 19:09:57 2010 +0000
@@ -25,6 +25,12 @@
 int
 main(int argc, char **argv)
 {
+    /* Load the SDL library */
+    if (SDL_Init(SDL_INIT_AUDIO) < 0) {
+        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
+        return (1);
+    }
+
     /* Print available audio drivers */
     int n = SDL_GetNumAudioDrivers();
     if (n == 0) {
@@ -38,12 +44,6 @@
         printf("\n");
     }
 
-    /* Load the SDL library */
-    if (SDL_Init(SDL_INIT_AUDIO) < 0) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
-        return (1);
-    }
-
     printf("Using audio driver: %s\n\n", SDL_GetCurrentAudioDriver());
 
     print_devices(0);