FSB5 file format specification?

Hi, is there any information about how FSB5 file structure looks like? I found this, which describes every format up to FSB4: https://www.fmod.org/questions/question/forum-4928/. I would like something similar for FSB5.

I’m trying to manually create FSB files in-memory during runtime, so I can load Ogg Vorbis using the FMOD_CREATECOMPRESSEDSAMPLE flag (since it only supports it in FSB format). I don’t want to use FSBank API because it will recompress the data, but I already have the compressed vorbis data and performing compression during runtime is not an option. I just need to (hopefully) append the FSB header to it.

Any help on FSB5 format, or how to do what I’m trying to in some other way, is appreciated.

We don’t have any public information about the FSB5 file format and it’s quite a bit more complicated than FSB4 (not simply a header struct).

Also the problem you face is not as simple as you might think. FSB Vorbis is not Ogg Vorbis packed with an FSB header. We strip away the Ogg layer, use our own packet headers and simplify some of the compression options on the encode side to ensure efficient decoding. The only way to produce compatible Vorbis bitstream is to use our tools or libraries.

If you don’t have the source assets to compress from your only option is recompress and audition the result. Depending on the level of compression of the original Ogg Vorbis you may not lose much quality.

Thanks for the answer, I was afraid of that. We’re using multiple audio backends and I was hoping we can keep the compressed data in common Ogg Vorbis format for all of them.

That is possible, but you’d need to stick to FMOD_CREATESOUND and FMOD_CREATESTREAM as you’ve discovered FMOD_CREATECOMPRESSEDSAMPLE is not available for our Ogg Vorbis decoder.

The only other option that comes to mind is use MP3, it’s not as good as Vorbis but we do support is as FMOD_CREATECOMPRESSEDSAMPLE for now.

We would like to offer all three possibilities for all audio clips.

I’ll try manually decompressing Ogg to PCM and using FMOD_OPENUSER to get around the issue, if that’s possible.

Adding this for those that might be facing a similar problem.

Although I wasn’t able to create FSB files in memory, I was able to decompress Ogg Vorbis during playback manually. To do it you should create your sound using FMOD_OPENUSER and in the read callback manually decompress Ogg into PCM, which should achieve the same effect as FMOD_CREATECOMPRESSEDSAMPLE.