i have a MusicTrackQueue object populated with five AudioTrack objects. it's set to RepeatType.ONE. the idea is each audiotrack loops until some game event changes the queue to a different audio track which loops until another change, etc.
the problem is, if i call MusicTrackQueue.setCurrentTrack(…) it starts the new track playing, but doesn't silence the old track (i can still hear it and the AudioTrack.isPlaying flag is true for both).
so what am i doing wrong? i could just stop the outgoing AudioTrack using AudioTrack.stop(), but i don't want to lose my crossfade.
public void musicSetTrack(final MOVEMENTS m, final float crossfadetime) {
Callable<?> gsCallable = new Callable<Object>() { public Object call() {
music.setCrossfadeinTime(crossfadetime);
music.setCrossfadeoutTime(crossfadetime);
music.setCurrentTrack(m.ordinal(), true);
return null;
} };
GameTaskQueueManager.getManager().getQueue(GameTaskQueue.UPDATE).enqueue(gsCallable);
}