i m developing an application using S60 3rd edition FP1 SDK, which can play multiple audio files.i tried this code but problem is it takes delay after playing one file i.e to start the next one. can anyone tell me how to play these files (one after another) using MMAPI. plzzz..its urgent
public class AudioPlayer implements javax.microedition.media.PlayerListener{
Player player;
int count=0;
public void playMedia(){
try{
player = Manager.createPlayer(getClass().getResourceAsStream(audioFiles[count]),"audio/x-amr");
player.addPlayerListener(this);
player.start();
}
catch (Exception e) {
return ;
}
}
public void playerUpdate(Player p,String event,Object eventData) {
if (event==PlayerListener.END_OF_MEDIA)
{
try{
if(++count == audioFiles.length)
p.stop();
else {
player = Manager.createPlayer(getClass().getResourceAsStream(audioFiles[count]]),"audio/x-amr" );
player.addPlayerListener(this);
player.start();
}
}
catch (Exception e) {
return;
}
}
}
}
![]()



