Skip to main content

mp3 player: large files problem

No replies
fitamix
Offline
Joined: 2007-08-29

Hello!

I have a problem with a mp3 music player created for me.

I have a problem with a mp3 music player that I have created.
When I reproduce a large mp3 file, of more than 24 minutes, I have problems with methods getMediaTime() and setMediaTime().

This is the code for rewind or forward the mp3 music player:

long SECS_TO_MICROSECS = 1000000L; // transform microsecs into seconds
long AVANCE_CANCION = 10; // forward or rewind 10 seconds

// forward with +, rewind with -
long tiempo = player.getMediaTime() + (AVANCE_CANCION * SECS_TO_MICROSECS);

player.stop(); // player is a javax.microedition.media.Player
player.setMediaTime(tiempo); //set the new time
player.start(); // start player again

This code works fine until minute 24, that forward automatically to minute 60.

Any idea/suggest??? Is this a api problem???

I have seen that this error does not happen in the emulator (with a big wav file). The error happens in the mobile (SE K800) with a big mp3 file. With KD Player (other music player), too this problem happens!

Message was edited by: fitamix