diff --git a/audio/Makefile b/audio/Makefile index e531390..7d0b8fa 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -4,8 +4,9 @@ CC = gcc -CCOPT = -Wall -g -DDEBUG_LEVEL=1 +CCOPT = -Wall -g -DDEBUG_LEVEL=0 LIBS = -lao -lsndfile -lm + player.o: player.c Makefile $(CC) ${CCOPT} -c $< diff --git a/audio/player.c b/audio/player.c index b0522ea..bc91046 100644 --- a/audio/player.c +++ b/audio/player.c @@ -65,7 +65,7 @@ sndf = sf_open(fname, SFM_READ, &sfinfo); if (NULL==sndf) { perror("sf_open"); - abort(); + return -2; } #if DEBUG_LEVEL diff --git a/audio/t.c b/audio/t.c index f69f2d8..e0d324f 100644 --- a/audio/t.c +++ b/audio/t.c @@ -4,15 +4,40 @@ #include #include - +#include #include "player.h" /* --------------------------------------------------------------------- */ +int verbosity; + +/* --------------------------------------------------------------------- */ +void help(int v) +{ + +} +/* --------------------------------------------------------------------- */ + int main(int argc, char *argv[]) { char *wavname = "1337.wav"; -int foo; +int foo, opt, K; + + +printf("\n**** %s **** compiled the %s at %s ***\n", + argv[0], __DATE__, __TIME__); + + +while ((opt = getopt(argc, argv, "hK:vw:")) != -1) { + switch (opt) { + case 'h': help(0); break; + case 'K': K = atoi(optarg); break; + case 'v': verbosity++; break; + case 'w': wavname = optarg; break; + default: break; + } + } + foo = blast_this_file(wavname);