For vgmstream, you can use a .pos file with .wav, which provides loop info, I think you can create a .pos with vgmtoolbox. There are also a few ways to put loop info in a .wav directly, such as the smpl chunk; vgmstream supports the .lwav extension so that the default .wav support in Winamp or whatever doesn't handle the file without the loop.
.pos+.wav is the best bet right now. Someone implemented flac support long ago but I never integrated it.
FLAC supports loop points kinda "natively" through the use of a RIFF sampler chunk. BUT most (if not all?) players ignore it. I know exactly one program, which is not a player, that actually reads the sampler chunk and sets the loop points correctly.
foo_loop by weiweiwowwow at 6:15 AM EST on November 11, 2015
I did some search and found THIS AMAZING SOLUTION for foobar2000, but only the source code available.I don't know how to compile a dll, so hope you guys can have a look at this and share your compiled dll fb2k component. Here is the README
Menu.ogg create a new file (blank)called Menu.ogg.loop and add the loop points into the new file LoopStart/LoopLength into that new file. Like --------------------- LoopStart=012345 Looplength=1234567890 --------------------- Same for .wav .flac etc..
I guess you play the loop file like you would with a .pos file.
That is what I think it does..
any updates on looping lossless format? by VGSB at 6:43 PM EST on February 12, 2018
Is there any foobar2000 component that can play a FLAC file with loop points in its metadata as described earlier in this thread, or any other for losslessly compressed format? If not, could vgmstream be updated to support something like .lwav that could actually be losslessy compressed (such as perhaps a new extension labeled .lflac that has the previously mentioned loop metadata)?
I think with vgmstream’s implementation of ffmpeg, it might be possible? The only question is where would be loop data be stored? In WAV, it’s located internally in the smpl chunk. Maybe, like you mentioned, in the metadata/tags like Ogg does. On the other hand, I’m staying away from using Flac on some gamerips because it doesn’t always recreate the original header. The raw data is fine but sometimes the size defined in the RIFF header is occasionally truncated, especially if there’s extra zero data at the end, even if it’s part of the raw stream, flac gets rid of it.
Oh yea, forgot about that. So what he said then —-^
using Python to convert integer samples from vgmstream to little endian 32 bit samples for pos files by VGSB at 1:12 PM EDT on June 20, 2018
I've created a Python script that can get the loop point sample counts of a streamed audio file using vgmstream. I would like for it to export .pos files to go along with the .flac.vgmstream files. But I'm not really familiar with how to convert integer samples to little endian 32 bit samples. Does anybody know of how to do this with Python or by calling an external exe?
Based on other POS files I've seen and testing, it seems that you can't just use a POS file with normal text file formatting where you can specify the number of samples as integers. It seems to require binary 32 bit samples, which I don't have enough experience with.