This is a basic MOD player that I am designing for my game. For the most part it is a fully-functioning half-panning stereo 8-channel player, however it has only implemented a few of the very basic MOD special-effects (volume control, speed/tempo control, track jumping, etc.).
The version provided here is half-panning stereo (4 channels in the left speaker, 4 channels in the right speaker). I have also written a full-panning version (balance for each channel may be set anywhere between left and right), but after I discovered that the actual GBA hardware wasn't really doing a very good job with it (there tends to be a bit of a signal leak on the headphone plug, so sound in one side "bleeds" into the other) I switched over to the half-panning version so as to implement a number of optimizations.
Key aspects of this program include:
At full capacity, both the player and the mixer consume only 10-13% of the CPU (this figure is based on actual tests on hardware). Similar MOD players without the same level of optimization take anywhere from 15-30% of the CPU. Both the code and the sound buffer consume slightly more than 2KB of internal RAM, which is almost negligible.
Use the A and B buttons to toggle between playing two songs.
Note that unless you are emulating on a VERY fast computer you will more than likely hear distortion from the emulator failing to keep up with the sound. This demo sounds best if you have a flash-ROM cartridge you can use to play it on actual hardware.
Also note that the MOD files in the demo were automagically converted from another, more sophisticated format (Impulse Tracker) and suffered some loss of quality in the transition. In particular, the second song (A Curious Tale) gets kind of wonky near the end. It is still playing correctly, however; it's just poorly encoded.
Both songs are from Secret of Mana by Square. The versions used in this demo were created (tracked) by fans and made available over the Internet.