2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License along
13 * with this program; if not, write to the Free Software Foundation, Inc.,
14 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 // sox -t raw -A -r 8000 -b alaw.alaw -t sw alaw.out
26 f
=fopen("alaw.dat","wb");
27 for(i
=0;i
<256;i
++) fwrite(&i
,1,1,f
);
30 system("sox -t raw -A -r 8000 -b alaw.dat -t sw alaw.out");
32 printf("// Generated by TOOLS/alaw-gen.c\n\n");
34 printf("#ifndef MPLAYER_ALAW_H\n");
35 printf("#define MPLAYER_ALAW_H\n");
37 printf("\nconst short alaw2short[]={\n");
39 f
=fopen("alaw.out","rb");
44 if(i
!=255) putchar(',');
45 if((i
&7)==7) printf("\n");
50 system("sox -t raw -U -r 8000 -b alaw.dat -t sw alaw.out");
52 printf("\nconst short ulaw2short[]={\n");
54 f
=fopen("alaw.out","rb");
59 if(i
!=255) putchar(',');
60 if((i
&7)==7) printf("\n");
65 printf("#endif /* MPLAYER_ALAW_H */\n");