But the music stops complety. will the music stop complety if I use ogg? Because I don't want to use WAV files they are too heavy.
I'm not really sure about the library that you are using, but most likely you can do this in two ways:
1. Calculate milliseconds of audio and call the play method of the song when a timer reaches that millisecond value.
2. If your library has a boolean for all songs called finished, you can just check if finished == true in your game loop and if it is true then call the play method of the song.
The 2nd option is more efficient.
Let me know if either of these don't make sense, I can elaborate on them if necessary.