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 | #Channels | Chiptune | Average CPU | Peak CPU |
| SAC09 | 4 | Yes | 6.0% | 7.9% |
| Space Debris | 4 | No | 6.1% | 7.1% |
| Cream of the Earth | 4 | No | 6.0% | 7.1% |
| Sould Binder 1 | 8 | No | 11.0% | 13.0% |
Anyway: Sources + Test
| Previous: Optimizing the Sound Mixer | Contents |