The Product

Well that was fun... :)

Let's see the final measurements, I took out the "DMA copy to RAM before resampling" feature because it uses up too much memory and doesn't offer much of a speed boost in return. I also replaced the divide SWI calls with something a bit faster, and fixed a few other things. Oh, and I also put the entire MOD player in IWRAM too. :P

.text (ROM/PROG)236 Bytes
.iwram (IWRAM/PROG)2464 Bytes
.bss (IWRAM/DATA)1152 Bytes

Wee, 3.8 KB! I'm pretty happy with that.

Here's the CPU load measurements for a few MODs (measurements taken at the most intense part of the songs).

MOD#ChannelsChiptuneAverage CPUPeak CPU
SAC094Yes6.0%7.9%
Space Debris4No6.1%7.1%
Cream of the Earth4No6.0%7.1%
Sould Binder 18No11.0%13.0%

Anyway: Sources + Test

Previous: Optimizing the Sound MixerContents