J2ME Mp3 player - playing mp3 files in loop
Hi any one knows how to play list of mp3 files in a loop automatically in J2ME? Please share code if u have.开发者_Go百科..
you can use this to play an .mp3 or .wav file
Player p;
InputStream is = getClass().getResourceAsStream(SoundName[sound]);
try {
p = Manager.createPlayer(is, "audio/X-wav");
p.start();
is.close();
is = null;
} catch (IOException ex) {
ex.printStackTrace();
} catch (MediaException ex) {
ex.printStackTrace();
}
p.setLoopCount(100);//using this you can play the sound in loop
精彩评论