Can files be pre-compressed?

Hi folks,

I’m working on a project with which I intend to distribute the FMOD Studio project. Naturally, this means distributing plenty of the source files within it, and while I got within a reasonable size-on-disk by re-encoding to 16/48k FLACs, I did notice that FMOD Studio both accepted OGG Vorbis source files and could build banks with that format. That got me thinking…is it possible to build FMOD Studio banks with lossy assets and not re-encode the audio?

I recognize this is a silly edge case, so I anticipate the answer to be “no,” outside of using FMOD Core and building my own .fsbank files, but I’m curious if it’s ever come up. If not, I’m also curious about specific best-practices to make sure as little data is lost as possible (ex: does Vorbis → FADPCM give better results than Vorbis → Vorbis), especially if built bank size is less of a concern.

Cheers!

Unfortunately, this isn’t possible. Re-encoding will always happen during the bank building process.

It’s worth keeping in mind that while they both use the FSBank API to encode, an .fsbank is distinct from a Studio bank, so it’s not possible to simply substitute one for the other.

The tradeoff between FADPCM and Vorbis is primarily one of CPU and memory impact. FADPCM is a simple codec optimized for speed which incurs less CPU impact but higher memory usage and size on disk. Vorbis, on the other hand, takes more CPU to decode at runtime, but occupies less space when compressed.

The desired quality of the audio after encoding is a factor relative to many things, including but not limited to CPU and memory usage limitations, target device specifications, and tradeoffs therein, so it’s difficult for me to simply recommend one specific compression method over the other. That said, FADPCM has no quality control option, and Vorbis does, so Vorbis should offer you a lot more flexibility when compressing.

1 Like