libertyernie / brawltools

BrawlBox and BrawlLib
http://forums.kc-mm.com/index.php?topic=67847.0
143 stars 31 forks source link

Export PCM data from BRSTM as OGG Vorbis with keeping of loop points #243

Open Wohlstand opened 2 years ago

Wohlstand commented 2 years ago

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:

libertyernie commented 2 years ago

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.

Wohlstand commented 12 months ago

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.