Export PCM data from BRSTM as OGG Vorbis with keeping of loop points
Hello!
Recently I got a new idea, and I guess, it would be very useful and will simplify a lot of things: there is around the OGG Vorbis format where loop points has been used as vorbis comments of next form:
LOOPSTART - the sample number where loop starts
LOOPLENGTH - the length of the loop area in samples (RPG Maker way)
LOOPEND - the sample number where loop ends (SDL_mixer and MixerX way)
Also:
LOOP_START / LOOP_END / LOOP_LENGTH were also supported by GZDoom and MixerX library
In some cases the timestamp values were allowed, however, I highly recommend you to use the sample values instead.
Anyway, I do have no idea which thing is possible to use in C#, there are two thinks:
- do use pre-built libogg.dll, libvorbisenc.dll, and libvorbis.dll modules with native-C way directly
- use some things like this one https://github.com/SteveLillis/.NET-Ogg-Vorbis-Encoder to encode OGG Vorbis files
I think LoopingAudioConverter can do this. It just calls out to sox.exe to write the ogg files, but I think it attaches the metadata itself afterwards.
Ye, I used this for some time. However, later, I made a very simple Python script that calls the vgmstream-cli and then, oggenc that uses the thing: https://github.com/Wohlstand/brstm2ogg
Just I don't need to use VM with Windows, I can do everything on Linux, just adding into my file manager's context menu to quickly convert needed files into OGG with loop tags kept.