/* test_rw_wav.c on ok.wav not working for all .wav files */ #include #include #include #include "rw_wav.h" int main(int argc, char * argv[]) { int i; char input_name[60] = "ok.wav"; char output_name[60] = "copy_ok.wav"; header w; char sound[1000000]; printf("test_rw_wav.c running \n"); if(argc<2) { printf("no input file given, using %s \n", input_name); } else { strcpy(input_name, argv[1]); printf("try to open %s for reading. \n", input_name); } if(argc<3) { printf("no output file given, using %s \n", output_name); } else { strcpy(output_name, argv[2]); printf("try to open %s for writing. \n", output_name); } printf("calling read_wave from %s \n", input_name); read_wave(input_name, & w, sound); printf("calling write_wave to %s \n", output_name); write_wave(output_name, w, sound); printf("test_rw_wav done. new %s file written \n", output_name); return 0; } /* end read_wav .c */