I’m trying to add some background music to my game. When I play the song it just repeats the first few seconds of audio.
music = new AudioNode(assetManager, “Sounds/DST-MysteriousMystery.wav”, true);
music.setLooping(true); // activate continuous playing music.setPositional(false); music.setVolume(3); rootNode.attachChild(music); music.play(); // play continuously!
Streamed audio can’t be looped. Use
music = new AudioNode(assetManager, "Sounds/DST-MysteriousMystery.wav", false);
instead
A guess: you are running JME 3.0?
Note: right now it’s important to mention which version of JME you are using since some things will be fixed in 3.1 and some things may be newly broken in 3.1. I think this is one that was fixed in 3.1.