4 // sox -t raw -A -r 8000 -b alaw.alaw -t sw alaw.out
10 f
=fopen("alaw.dat","wb");
11 for(i
=0;i
<256;i
++) fwrite(&i
,1,1,f
);
14 system("sox -t raw -A -r 8000 -b alaw.dat -t sw alaw.out");
16 printf("// Generated by TOOLS/alaw-gen.c\n\n");
18 printf("#ifndef MPLAYER_ALAW_H\n");
19 printf("#define MPLAYER_ALAW_H\n");
21 printf("\nconst short alaw2short[]={\n");
23 f
=fopen("alaw.out","rb");
28 if(i
!=255) putchar(',');
29 if((i
&7)==7) printf("\n");
34 system("sox -t raw -U -r 8000 -b alaw.dat -t sw alaw.out");
36 printf("\nconst short ulaw2short[]={\n");
38 f
=fopen("alaw.out","rb");
43 if(i
!=255) putchar(',');
44 if((i
&7)==7) printf("\n");
49 printf("#endif /* MPLAYER_ALAW_H */\n");