# HG changeset patch # User Sam Lantinga # Date 1141361022 0 # Node ID 0394f8ebc42ddddab9bbd67fb5336b220d145c64 # Parent c17d8210361489dcf2dead57695d78ddf59a9c7f *** empty log message *** diff -r c17d82103614 -r 0394f8ebc42d test/loopwave.c --- a/test/loopwave.c Thu Mar 02 13:26:24 2006 +0000 +++ b/test/loopwave.c Fri Mar 03 04:43:42 2006 +0000 @@ -4,10 +4,14 @@ /* loopwaves.c is much more robust in handling WAVE files -- This is only for simple WAVEs */ +#include "SDL_config.h" #include #include + +#if HAVE_SIGNAL_H #include +#endif #include "SDL.h" #include "SDL_audio.h" @@ -65,12 +69,9 @@ fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError()); return(1); } - if ( argv[1] == NULL ) { - fprintf(stderr, "Usage: %s \n", argv[0]); - quit(1); + argv[1] = "sample.wav"; } - /* Load the wave file into memory */ if ( SDL_LoadWAV(argv[1], &wave.spec, &wave.sound, &wave.soundlen) == NULL ) { @@ -78,8 +79,9 @@ argv[1], SDL_GetError()); quit(1); } + wave.spec.callback = fillerup; - +#if HAVE_SIGNAL_H /* Set the signals */ #ifdef SIGHUP signal(SIGHUP, poked); @@ -89,6 +91,7 @@ signal(SIGQUIT, poked); #endif signal(SIGTERM, poked); +#endif /* HAVE_SIGNAL_H */ /* Initialize fillerup() variables */ if ( SDL_OpenAudio(&wave.spec, NULL) < 0 ) {