Thanks for the answer!
No, the alSourcei(sourceID, AL_LOOPING, AL_TRUE) does not work, it throws an exception when I tried to do that.
Ok, that is roughly what I had in mind but I would have liked an easier way, like the statement above… We are always looking for the easiest way, huh?
I’ve looked at this solution to some extension, but the input streams (VorbisInputstream) returns false when calling isMarkSupported(). Can I reset (rewind) an VorbisStream or do I have to create new streams?
Here is how the streams are created. This is from the file OggDecoder.java on https://joal-demos.dev.java.net/source/browse/joal-demos/src/java/demos/devmaster/lesson8/OggDecoder.java?view=markup
public boolean initialize() {
try {
CachedUrlStream os = new CachedUrlStream(url);
loStream = (LogicalOggStream) os.getLogicalStreams().iterator().next();
vStream = new VorbisStream(loStream);
vStreamHdr = vStream.getIdentificationHeader();
audioFormat = new AudioFormat(
(float) vStreamHdr.getSampleRate(),
16,
vStreamHdr.getChannels(),
true, true);
ais = new AudioInputStream(
new VorbisInputStream(vStream), audioFormat, -1);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}