Use new 1.3 API for getting audio driver name.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 10 Oct 2009 06:39:59 +0000
changeset 3360dc6384958091
parent 3359 aecbdf3362c3
child 3361 d559edc85610
Use new 1.3 API for getting audio driver name.
test/loopwave.c
     1.1 --- a/test/loopwave.c	Sat Oct 10 06:32:11 2009 +0000
     1.2 +++ b/test/loopwave.c	Sat Oct 10 06:39:59 2009 +0000
     1.3 @@ -64,14 +64,9 @@
     1.4      done = 1;
     1.5  }
     1.6  
     1.7 -
     1.8 -#define NAMESIZE 32
     1.9 -
    1.10  int
    1.11  main(int argc, char *argv[])
    1.12  {
    1.13 -    char name[NAMESIZE];
    1.14 -
    1.15      /* Load the SDL library */
    1.16      if (SDL_Init(SDL_INIT_AUDIO) < 0) {
    1.17          fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    1.18 @@ -110,7 +105,7 @@
    1.19      /* Right now we're using the 1.2 SDL_OpenAudio(), but if we move to the
    1.20         1.3 device enumeration version, we shouldn't hardcore device id #1 for
    1.21         SDL_GetAudioDeviceName(), below. */
    1.22 -    printf("Using audio driver: %s\n", SDL_AudioDriverName(name, NAMESIZE));
    1.23 +    printf("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
    1.24      printf("Using audio device: %s\n", SDL_GetAudioDeviceName(1, 0));
    1.25  
    1.26      /* Let the audio run */