test/loopwave.c
changeset 6715 a02458e71c95
parent 5535 96594ac5fd1a
child 7191 75360622e65f
child 8377 3a7e8110201e
     1.1 --- a/test/loopwave.c	Thu Nov 29 00:45:36 2012 -0800
     1.2 +++ b/test/loopwave.c	Thu Nov 29 09:48:42 2012 -0800
     1.3 @@ -78,6 +78,8 @@
     1.4  int
     1.5  main(int argc, char *argv[])
     1.6  {
     1.7 +    int i;
     1.8 +
     1.9      /* Load the SDL library */
    1.10      if (SDL_Init(SDL_INIT_AUDIO) < 0) {
    1.11          fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    1.12 @@ -106,6 +108,17 @@
    1.13      signal(SIGTERM, poked);
    1.14  #endif /* HAVE_SIGNAL_H */
    1.15  
    1.16 +    /* Show the list of available drivers */
    1.17 +    printf("Available audio drivers: ");
    1.18 +    for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
    1.19 +        if (i == 0) {
    1.20 +            printf("%s", SDL_GetAudioDriver(i));
    1.21 +        } else {
    1.22 +            printf(", %s", SDL_GetAudioDriver(i));
    1.23 +        }
    1.24 +    }
    1.25 +    printf("\n");
    1.26 +
    1.27      /* Initialize fillerup() variables */
    1.28      if (SDL_OpenAudio(&wave.spec, NULL) < 0) {
    1.29          fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
    1.30 @@ -126,3 +139,5 @@
    1.31      SDL_Quit();
    1.32      return (0);
    1.33  }
    1.34 +
    1.35 +/* vi: set ts=4 sw=4 expandtab: */