Mercurial > mplayer.hg
view TOOLS/alaw-gen.c @ 24340:df689b37871f
Fix compilation after FFmpeg AUDIO_(DE)MUXER split
The FFmpeg build system split AUDIO_(DE)MUXER into two parts:
AUDIO_BEOS_(DE)MUXER and OSS_(DE)MUXER. cehoyos's earlier fix only
changed the code from AUDIO_(DE)MUXER to AUDIO_BEOS_(DE)MUXER ignoring
the other half of the split. Fix it to also disable OSS_(DE)MUXER.
author | uau |
---|---|
date | Fri, 07 Sep 2007 18:57:45 +0000 |
parents | 5c5fb6af79d1 |
children | 3bb953467710 |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> // sox -t raw -A -r 8000 -b alaw.alaw -t sw alaw.out int main(void){ int i; FILE *f; f=fopen("alaw.dat","wb"); for(i=0;i<256;i++) fwrite(&i,1,1,f); fclose(f); system("sox -t raw -A -r 8000 -b alaw.dat -t sw alaw.out"); printf("// Generated by TOOLS/alaw-gen.c\n"); printf("\nshort alaw2short[]={\n"); f=fopen("alaw.out","rb"); for(i=0;i<256;i++){ signed short x; fread(&x,2,1,f); printf("%6d",x); if(i!=255) putchar(','); if((i&7)==7) printf("\n"); } fclose(f); printf("};\n"); system("sox -t raw -U -r 8000 -b alaw.dat -t sw alaw.out"); printf("\nshort ulaw2short[]={\n"); f=fopen("alaw.out","rb"); for(i=0;i<256;i++){ signed short x; fread(&x,2,1,f); printf("%6d",x); if(i!=255) putchar(','); if((i&7)==7) printf("\n"); } fclose(f); printf("};\n"); return 0; }