Hi any one knows how to play list of mp3 files in a loop automatically in J2ME? Please share code if u have...
Asked
Active
Viewed 1,805 times
1 Answers
1
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

Lucifer
- 29,392
- 25
- 90
- 143

ios developer
- 3,363
- 3
- 51
- 111