最后是layout.3文件
#include <stdio.h>
#include <stdlib.h>
#include "common.h"
#include "decode.h"
int main(int argc, char**argv)
{
FILE *musicout;
Bit_stream_struc bs;
frame_params fr_ps;
III_side_info_t III_side_info;
III_scalefac_t III_scalefac;
unsigned int old_crc;
layer info;
int sync, clip;
int done = FALSE;
unsigned long frameNum=0;
unsigned long bitsPerSlot;
unsigned long sample_frames;
typedef short PCM[2][SSLIMIT][SBLIMIT];
PCM *pcm_sample;
pcm_sample = (PCM *) mem_alloc((long) sizeof(PCM), "PCM Samp");
if (argc==1) {
printf("Useage:decode file.mp3 output.pcm\n");
return;
}
fr_ps.header = &info;
if ((musicout = fopen(argv[2], "w+b")) == NULL) {
printf ("Could not create \"%s\".\n", argv[2]);
exit(1);
}