Open xiangyuecn opened 4 years ago
The LAME information of the encoded MP3 file is garbled.
Bad data (MP3 HEX):
//LAME???????? 4C 41 4D 45 03 00 09 08 00 04
Data that should have appeared:
//LAME3.98.4 4C 41 4D 45 33 2E 39 38 2E 34
All charAt should be replaced with charCodeAt, because character selection Java and JS are different.
charAt
charCodeAt
Major impact codes: https://github.com/zhuker/lamejs/blob/0ae7a4a86bf671a025d1e68aede9cf9932fbe059/src/js/BitStream.js#L201
charCodeAt should be used.
Problem
The LAME information of the encoded MP3 file is garbled.
Bad data (MP3 HEX):
Data that should have appeared:
How to solve
All
charAt
should be replaced withcharCodeAt
, because character selection Java and JS are different.Major impact codes: https://github.com/zhuker/lamejs/blob/0ae7a4a86bf671a025d1e68aede9cf9932fbe059/src/js/BitStream.js#L201
charCodeAt
should be used.