Decompressing Banks into Memory


Is there a way to make Studio::bank::loadSampleData() decompress the data into memory at load time? (to avoid the performance hit at play time)

In low level System::createSound, you can specify FMOD_CREATESAMPLE, but there is no such option in Studio API. Also, in Designer Tool you were able to tag the banks as “Decompress to Memory” but no such feature in Studio tool.

If this is not possible, is there anything I can do to make Vorbis decompression at play time faster? would higher quality make it slower or faster? any tips would help.



There is no equivalent of the “Decompress into memory” setting. For iPhone we suggest using ADPCM in-memory samples if you have performance issues.

You can see some benchmarks on the CPU cost of 32 channels here

With Vorbis compression higher quality settings have a higher CPU cost to decode (the numbers above are with quality 60).

1 Like

Thanks for the detailed reply.

Just curious, why Decompress to Memory is not supported anymore? It sounds like something that fits iOS well. It saves CPU cycle at play time, and keeps the file size low without losing much quality and the memory footprint disadvantage could be managed by App by purging the decompressed data when it’s not critically needed.
On the other hand, ADPCM might be soft on CPU, but it won’t give the same compression and quality we can get from Vorbis.