#2013_10_10 星期四 add by greshem
H:\portage\media-sound\lame\lame-3.99.5.chm::/S/91.html#L436
main 436 frontend/main.c int main(int argc, char *argv[])
464 lame_init(); /* initialize libmp3lame */
612 lame_main(lame_t gf, int argc, char **argv)
lame_set_write_id3tag_automatic(gf, 0);
lame_init_params(gf);
lame_get_decode_only(gf)) {
lame_decoder(gf, outf, inPath, outPath);
lame_encoder(gf, outf, 0, inPath, outPath);
lame_encoder_loop(gf, outf, nogap, inPath, outPath);
lame_get_id3v2_tag(gf, 0, 0);
lame_get_id3v2_tag(gf, id3v2tag, id3v2_size);
get_audio(gf, Buffer);
lame_encode_buffer_int(gf, Buffer[0], Buffer[1], iread,
lame_encode_buffer_template(gfp, pcm_l, pcm_r, nsamples, mp3buf, mp3buf_size, pcm_int_type, 1, norm);
lame_copy_inbuffer(gfc, buffer_l, buffer_l, nsamples, pcm_type, aa, norm);
lame_encode_buffer_sample_t(gfc, nsamples, mp3buf, mp3buf_size);
lame_encode_mp3_frame(gfc, mfbuf[0], mfbuf[1], mp3buf, buf_size);
#重点流程 一共 5个步骤, 存 数值计算
lame_encode_flush(gf, mp3buffer, sizeof(mp3buffer)); /* may return one more mp3 frame , 收尾工作*/
write_xing_frame(gf, outf, id3v2_size);
parse_nogap_filenames(nogapout, nogap_inPath[i], outPath, nogapdir);
init_files(gf, nogap_inPath[i], outPath);
lame_init_bitstream(gf);
lame_set_nogap_total(gf, max_nogap);
lame_set_nogap_currentindex(gf, i);
lame_encoder(gf, outf, use_flush_nogap, nogap_inPath[i], outPath);