简体   繁体   中英

J2ME Native Mp3 Player - to play mp3 files larger than 1.5 MB

I am trying a play 5mb Mp3 file using the following code in J2me devices.

 InputStream myInputStream = getClass().getResourceAsStream("/Test.mp3");
   Player myPlayer = Manager.createPlayer(myInputStream, "audio/mpeg");
   myInputStream.close(); // Closing inputStream after creating Player object.
   myPlayer.realize();
   myPlayer.prefetch();
   myPlayer.start();

This code works for mp3 file below 1.5 MB but not working for larger files.Does any one how actually the native mp3 players in devices playing mp3 files.

通过编程,低端J2ME设备或低内存设备最多可以播放1.5 MB大小的歌曲。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM