I'm successfully streaming ogg vorbis data to openAL with the Java library JOrbis, but now I want to loop over a part of this stream, e.g from 30" to 1'30".
I thought that at the end of the loop, I could redecode from the beginning of the file, skip the unwanted part, and then keep streaming until the end of the loop, and restart again. But I'm not really convinced by this method, as for example, if I want to loop over 4' and 4'30", I'll need to decode each loop 4 minutes of ogg data for nothing.
Another way would be to put all the loop in memory, but it won't be streaming anymore and I want to avoid this.
So is there a way to reach a point in an ogg vorbis stream without decoding the previous data every time ? Does ogg contains a kind of index that can be used, or is it possible to make one by decoding the whole file once before ?
Thanks
(ps: I could't give this question the right tags as I haven't yet 150 rep)