# HG changeset patch # User arpi # Date 1033178589 0 # Node ID 8d21936b31d6b7b6866d49f1f1eb0f22172aeeb8 # Parent 84f406c22df15f93cb45300e7fa7eb111851e6e9 layer-1 stream parsing (NOT decoding) support diff -r 84f406c22df1 -r 8d21936b31d6 mp3lib/sr1.c --- a/mp3lib/sr1.c Fri Sep 27 23:07:05 2002 +0000 +++ b/mp3lib/sr1.c Sat Sep 28 02:03:09 2002 +0000 @@ -265,7 +265,17 @@ MP3_framesize=fr->framesize; fr->framesize += fr->padding - 4; break; + case 1: +// fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : 32; + MP3_bitrate=tabsel_123[fr->lsf][0][fr->bitrate_index]; + MP3_samplerate=freqs[fr->sampling_frequency]; + fr->framesize = (long) MP3_bitrate * 12000; + fr->framesize /= MP3_samplerate; + MP3_framesize = fr->framesize; + fr->framesize = ((fr->framesize+fr->padding)<<2)-4; + break; default: + MP3_framesize=fr->framesize=0; // fprintf(stderr,"Sorry, unsupported layer type.\n"); return 0; } @@ -539,6 +549,9 @@ switch(fr.lay){ case 2: do_layer2(&fr,single);break; case 3: do_layer3(&fr,single);break; + case 1: + printf("mp3lib: layer-1 audio not yet supported!\n"); + return 4608; default: return 0; // unsupported }