MCPcopy Create free account
hub / github.com/zhuker/lamejs / LameDecoder

Method LameDecoder

src/main/java/lowlevel/LameDecoder.java:49–143  ·  view source on GitHub ↗
(String mp3File)

Source from the content-addressed store, hash-verified

47 private LameGlobalFlags gfp;
48
49 public LameDecoder(String mp3File) {
50 // encoder modules
51 lame = new Lame();
52 gaud = new GetAudio();
53 ga = new GainAnalysis();
54 bs = new BitStream();
55 p = new Presets();
56 qupvt = new QuantizePVT();
57 qu = new Quantize();
58 vbr = new VBRTag();
59 ver = new Version();
60 id3 = new ID3Tag();
61 rv = new Reservoir();
62 tak = new Takehiro();
63 parse = new Parse();
64
65 mpg = new MPGLib();
66 intf = new Interface();
67 common = new Common();
68
69 lame.setModules(ga, bs, p, qupvt, qu, vbr, ver, id3, mpg);
70 bs.setModules(ga, mpg, ver, vbr);
71 id3.setModules(bs, ver);
72 p.setModules(lame);
73 qu.setModules(bs, rv, qupvt, tak);
74 qupvt.setModules(tak, rv, lame.enc.psy);
75 rv.setModules(bs);
76 tak.setModules(qupvt);
77 vbr.setModules(lame, bs, ver);
78 gaud.setModules(parse, mpg);
79 parse.setModules(ver, id3, p);
80
81 // decoder modules
82 mpg.setModules(intf, common);
83 intf.setModules(vbr, common);
84
85 gfp = lame.lame_init();
86
87 /*
88 * turn off automatic writing of ID3 tag data into mp3 stream we have to
89 * call it before 'lame_init_params', because that function would spit
90 * out ID3v2 tag data.
91 */
92 gfp.write_id3tag_automatic = false;
93
94 /*
95 * Now that all the options are set, lame needs to analyze them and set
96 * some more internal options and check for problems
97 */
98 lame.lame_init_params(gfp);
99
100 parse.input_format = GetAudio.sound_file_format.sf_mp3;
101
102 StringBuilder inPath = new StringBuilder(mp3File);
103 Enc enc = new Enc();
104
105 gaud.init_infile(gfp, inPath.toString(), enc);
106

Callers

nothing calls this directly

Calls 4

lame_initMethod · 0.80
lame_init_paramsMethod · 0.80
init_infileMethod · 0.80
setModulesMethod · 0.45

Tested by

no test coverage detected