0
0

I’m just starting work on an iOS game’s music that needs to be long, but compact, and a bit adaptible to the game situation. Tracker music is the ideal choice.

The developer working on the game tested an older tracker song I had made for another game, and found that it uses about [b:d35qym87]6 Mb[/b:d35qym87] of memory during playback. However, the .it song file itself only has some [b:d35qym87]1.87 Mb[/b:d35qym87] worth of samples (unpacked), so I’m wondering what is causing the bloat, and what I can do to avoid it? Or is this normal?

A few points come to mind:
– Some of the samples use Ping Pong loops. Do these get "mirrored" into memory (as in, the looping segment is duplicated and reversed into memory)?
– A lot of the samples are re-used across several instruments. That is, the same sample is used with different envelopes to make as many instruments with as few samples as possible. Do these perhaps actually get duplicated in memory in FMOD?

  • You must to post comments
0
0

ah ok that makes sense.

  • You must to post comments
0
0

That memory bloat was happening when I loaded the it-file with createSample(), which was the wrong way of doing it. Using the correct createStream() works fine, including memory usage.

So, this topic is related to [url:1sua1r3j]http://www.fmod.org/forum/viewtopic.php?f=7&t=14485[/url:1sua1r3j]

  • You must to post comments
0
0

It may be that if the sample data is compressed in the .it then it will decompress it when it loads the song.
Ping pong loops are not duplicated, we support that natively in our mixer.
samples aren’t duplicated, they are only loaded once and references are made from multiple locations to the 1 sample.

I wonder if some of the memory mentioned there is actually the overhead of fmod before it even loads the song? That that it would be megabytes but there’s usually a few hundred k allocated upon init for dsp/mixing buffers etc.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.