FADPCM vs Vorbis for Mobile

I just realized that FADPCM defaults to 24KHz on mobile which sounds not good.

I was about to increase the sample rate to 44.1KHz, but then I wondered:

Is it best to keep using FADPCM for mobile at 44.1KHz, or just use Vorbis? Which is going to be the better option for mobile? Is FADPCM still more performant at 44.1KHz vs Vorbis at 44.1KHz? Which will sound better? Which will take up more memory at runtime?

Also, why does streaming a file take so much less CPU than playing compressed in memory? I would have thought exactly the opposite!

You can see from the performance references for both Android and iOS that FADPCM performs better than Vorbis. You could use Vorbis over FADPCM if compression is too low, or PCM for short sounds if FADPCM cost is too high. In terms of sample rate, a higher sample rate will have better audio quality but at the cost of using more resources. The defaults are just there as a suggestion.


Also, why does streaming a file take so much less CPU than playing compressed in memory?

This is because streams are decoded on the stream thread. You need to compare against the “stream” CPU graph in a recorded profiler session (only available in FMOD Studio 2.02+).

Thanks very much for your reply! I guess I still don’t understand the streaming bit though.

I thought the “compressed” option loaded the whole compressed file into memory. So when it starts playing, the behavior is exactly like streaming except instead of loading from disk, it’s loading from memory? Or maybe there’s something fundamentally different I’m not getting.

So compressed is just streaming with an initial cost of loading the file into memory (and holding it there). If anything, I’d have thought it would take less CPU.

Streaming does use less CPU, but because it uses a separate system/thread dedicated only to streaming it makes it hard to directly compare compressed vs streaming when using a profiler session. If you record a session using FMOD Studio 2.02 or later then you are able to see this streaming CPU thread and it will make more sense.

Ahhhh it’s just not reported! OK thanks for explaining that!