Mercurial > mplayer.hg
comparison TOOLS/alaw-gen.c @ 25863:3bb953467710
The alaw tables should be const.
author | diego |
---|---|
date | Sun, 27 Jan 2008 18:38:47 +0000 |
parents | 5c5fb6af79d1 |
children | ae6c30322f95 |
comparison
equal
deleted
inserted
replaced
25862:4be9faee0360 | 25863:3bb953467710 |
---|---|
13 | 13 |
14 system("sox -t raw -A -r 8000 -b alaw.dat -t sw alaw.out"); | 14 system("sox -t raw -A -r 8000 -b alaw.dat -t sw alaw.out"); |
15 | 15 |
16 printf("// Generated by TOOLS/alaw-gen.c\n"); | 16 printf("// Generated by TOOLS/alaw-gen.c\n"); |
17 | 17 |
18 printf("\nshort alaw2short[]={\n"); | 18 printf("\nconst short alaw2short[]={\n"); |
19 | 19 |
20 f=fopen("alaw.out","rb"); | 20 f=fopen("alaw.out","rb"); |
21 for(i=0;i<256;i++){ | 21 for(i=0;i<256;i++){ |
22 signed short x; | 22 signed short x; |
23 fread(&x,2,1,f); | 23 fread(&x,2,1,f); |
28 fclose(f); | 28 fclose(f); |
29 printf("};\n"); | 29 printf("};\n"); |
30 | 30 |
31 system("sox -t raw -U -r 8000 -b alaw.dat -t sw alaw.out"); | 31 system("sox -t raw -U -r 8000 -b alaw.dat -t sw alaw.out"); |
32 | 32 |
33 printf("\nshort ulaw2short[]={\n"); | 33 printf("\nconst short ulaw2short[]={\n"); |
34 | 34 |
35 f=fopen("alaw.out","rb"); | 35 f=fopen("alaw.out","rb"); |
36 for(i=0;i<256;i++){ | 36 for(i=0;i<256;i++){ |
37 signed short x; | 37 signed short x; |
38 fread(&x,2,1,f); | 38 fread(&x,2,1,f); |