From c88c4b0d5ad366489f0c75b39017756958b5bd20 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 3 Mar 2006 04:43:42 +0000 Subject: [PATCH] *** empty log message *** --- test/loopwave.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/loopwave.c b/test/loopwave.c index 94ba906e3..a0923384e 100644 --- a/test/loopwave.c +++ b/test/loopwave.c @@ -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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) argv[1], SDL_GetError()); quit(1); } - wave.spec.callback = fillerup; + wave.spec.callback = fillerup; +#if HAVE_SIGNAL_H /* Set the signals */ #ifdef SIGHUP signal(SIGHUP, poked); @@ -89,6 +91,7 @@ int main(int argc, char *argv[]) signal(SIGQUIT, poked); #endif signal(SIGTERM, poked); +#endif /* HAVE_SIGNAL_H */ /* Initialize fillerup() variables */ if ( SDL_OpenAudio(&wave.spec, NULL) < 0 ) {