test/loopwave.c
changeset 9922 b066d5fd5fa7
parent 9619 b94b6d0bff0f
child 9945 09d546e9d8a1
equal deleted inserted replaced
9921:8865d17947de 9922:b066d5fd5fa7
    91 main(int argc, char *argv[])
    91 main(int argc, char *argv[])
    92 {
    92 {
    93     int i;
    93     int i;
    94     char filename[4096];
    94     char filename[4096];
    95 
    95 
    96 	/* Enable standard application logging */
    96     /* Enable standard application logging */
    97 	SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
    97     SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
    98 
    98 
    99     /* Load the SDL library */
    99     /* Load the SDL library */
   100     if (SDL_Init(SDL_INIT_AUDIO) < 0) {
   100     if (SDL_Init(SDL_INIT_AUDIO) < 0) {
   101         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
   101         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
   102         return (1);
   102         return (1);
   127 #endif /* HAVE_SIGNAL_H */
   127 #endif /* HAVE_SIGNAL_H */
   128 
   128 
   129     /* Show the list of available drivers */
   129     /* Show the list of available drivers */
   130     SDL_Log("Available audio drivers:");
   130     SDL_Log("Available audio drivers:");
   131     for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
   131     for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
   132 		SDL_Log("%i: %s", i, SDL_GetAudioDriver(i));
   132         SDL_Log("%i: %s", i, SDL_GetAudioDriver(i));
   133     }
   133     }
   134 
   134 
   135     /* Initialize fillerup() variables */
   135     /* Initialize fillerup() variables */
   136     if (SDL_OpenAudio(&wave.spec, NULL) < 0) {
   136     if (SDL_OpenAudio(&wave.spec, NULL) < 0) {
   137         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open audio: %s\n", SDL_GetError());
   137         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open audio: %s\n", SDL_GetError());