although this question has been around for several years, you should note that this solution will not work with the latest version of JLayer and AdvancedPlayer !
AdvancedPlayer -> public boolean play (int frames) -> conditional
if(!ret) { .. }
must be re-entered, because otherwise playback will stop after playing one frame.
EDIT:
it seems that, since Java 7, their daemonThreads processing does not allow the restart. just delete
t.setDaemon(true);
so it works again!
Zahlii
source share