[b09f68]: tools / sound / display_sound_bytes.c  Maximize  Restore  History

Download this file

26 lines (14 with data), 334 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>
int main(int argc, char **argv) {
FILE *sound_file ;
unsigned int c,i ;
if( argc != 2 ) {
printf("usage: %s <filename>\n",argv[0]) ;
exit(0) ;
}
sound_file = fopen(argv[1],"r") ;
for( i = 0 ; ( c = fgetc(sound_file) ) != EOF ; i++ ) {
printf("byte %d -> %d\n",i,c) ;
}
return(0) ;
}