There is a JLayerME-CLDC0.2 dedicated to playing MP3 files and getting the bit rate/sampling rate of MP3 files on cldc1.0/midp2.0.
Jlayerme uses its own decoder to parse the MP3 format and convert it to WAV format. This format is supported by the real machine and then played by manager. createplayer.
Therefore, resources are greatly consumed.
They developers also said that the current JLayerME-CLDC0.2 is not a product.
This project is in:
Project homepage:
Http://www.javazoom.net/javalayer/javalayerme.html
Java and MP3 online forums:
Http://www.javazoom.net/services/forums/index.jsp
I can run successfully on Eclipse, but it does not respond when it is uploaded to the Nokia real machine. If you use the s60 simulator of Nokia, the following error is reported. I have set the Java heap size of the simulator to 16 MB:
MMA: exception during Remote Invocation
Cannot open the file with the mp3towav datasource! Null/class javax. microedition. Media. mediaexception
However, for MP3 resources, the Nokia s60 simulator also allows jlayerme to obtain MP3 attributes, as shown in the following debug information:
-- Mp3decoder comments -- parse locator:/RES/test.pdf
-- Mp3decoder comments -- create decoder and connect the datasource (push the wav header)
-- Mp3decoder comments -- WAV stream mode: frequency: 48000, channels: 2
Enter createheader
Generate the wav header: Okay
If you are interested, try it out.
You can download myCode, Import to eclipse:
Http://files.cnblogs.com/zhengyun_ustc/JLayerMp3MIdlet.rar
When running on your wtk2.2 simulator, remember:
Modify ktoolbar preferences to have 16000 kb heap size and Vm speed emulation disabled.