Java MP3 player – play, pause & seek not working as intended with jLayer
Java MP3 player – play, pause & seek not working as intended with jLayer
You seem to have to be calling stop on your pause method and not giving it a location.
public void pausemusic() throws LineUnavailableException {
player.stop();
}
public void stopmusic() throws LineUnavailableException {
player.stop();
pausedOnFrame = 0;
}
Im not familiar with how your code works, but if the stopmusic method resets the song to 0 via the pausedOnFrame = 0, why dont you keep a counter during the play so that you can create a pause method that knows where to locate itself?
In short, why arent you tracking where the song is?