test/loopwave.c
changeset 8377 3a7e8110201e
parent 8354 c086e9e73916
parent 6715 a02458e71c95
child 8477 ad08f0d710f3
     1.1 --- a/test/loopwave.c	Sun Dec 16 21:39:02 2012 -0500
     1.2 +++ b/test/loopwave.c	Sun Dec 16 22:02:01 2012 -0500
     1.3 @@ -78,6 +78,7 @@
     1.4  int
     1.5  main(int argc, char *argv[])
     1.6  {
     1.7 +    int i;
     1.8      char filename[4096];
     1.9  
    1.10      /* Load the SDL library */
    1.11 @@ -110,6 +111,17 @@
    1.12      signal(SIGTERM, poked);
    1.13  #endif /* HAVE_SIGNAL_H */
    1.14  
    1.15 +    /* Show the list of available drivers */
    1.16 +    printf("Available audio drivers: ");
    1.17 +    for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
    1.18 +        if (i == 0) {
    1.19 +            printf("%s", SDL_GetAudioDriver(i));
    1.20 +        } else {
    1.21 +            printf(", %s", SDL_GetAudioDriver(i));
    1.22 +        }
    1.23 +    }
    1.24 +    printf("\n");
    1.25 +
    1.26      /* Initialize fillerup() variables */
    1.27      if (SDL_OpenAudio(&wave.spec, NULL) < 0) {
    1.28          fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
    1.29 @@ -130,3 +142,5 @@
    1.30      SDL_Quit();
    1.31      return (0);
    1.32  }
    1.33 +
    1.34 +/* vi: set ts=4 sw=4 expandtab: */