How to play once then loop over seperate file?

I have a sound of a jet engine firing up. Obviously I only want that sound to play once and then the rest of the time I want the sound of the jet after it has been going for a while. So my question is how do I play the sound once and then change it to get it to playing something else? Hope this makes sense. Here is my code for the little sound part.



        AudioSystem audio = AudioSystem.getSystem();
        audio.getEar().trackOrientation(cam);
        audio.getEar().trackPosition(cam);
      
        engineSound = audio.createAudioTrack( JetDemo.class.getResource( "/data/sound/enginestarting.wav" ), false);;
        engineSound.setMaxAudibleDistance(1000);
        engineSound.setVolume(1.0f);
        engineSound.
       

Well one way (not sure if the best) would be to just create a MusicQueue of the 2 audiofiles and set it on repeat. Then add CurrentSongChangeListener to the queue and when it fires the first time (first audio file is played and second one starts), remove the first audio file from the MusicQueue. That would just leave the second file there which you could keep looping indefinitly.



But perhaps there are more eloquent methods…

My more elegant method ended up to be just me editing the file in audacity before importing it…obviously not the ideal soln but it worked non-the-less.