1 /* -*- c-basic-offset: 4 -*- */
2 /* wavbreaker - A tool to split a wave file up into multiple waves.
3 * Copyright (C) 2002-2004 Timothy Robinson
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 #include <stdio.h>
21 #include <string.h>
22 #include <libgen.h>
23 #include "wav.h"
24 #include "sample.h"
25
main(int argc,char * argv[])26 int main(int argc, char *argv[])
27 {
28 int i;
29
30 if( argc < 2) {
31 printf( "Usage: %s [file1.wav] [...]\n", basename( argv[0]));
32 return 1;
33 }
34
35 for( i = 1; i < argc; i++) {
36 SampleInfo sampleInfo;
37
38 printf( "Header info for: %s\n", argv[i]);
39
40 if( wav_read_header( argv[i], &sampleInfo, 1) != 0) {
41 printf("%s", wav_get_error_message());
42 }
43
44 printf("\n");
45 }
46
47 return 0;
48 }
49