Advanced Sound Library

version 1.0

The Advanced Sound Library (ASlib) is a new sound library for the NDS.


* MP3 engine:
– mp3 is decoded on the arm7, so use nearly no CPU time on the arm9
– stereo & surround modes available (surround works even for mono mp3s)
– up to 44Khz/stereo/96Kbps, though I recommend using 32Khz/stereo/80Kbps max, which is enough for the DS and works great with up to +25%/-100% pitching
– support real-time pitching (changing the playing speed of the mp3)
– support real-time volume and panning change
– the mp3 can be paused and restarted
– the mp3 can be set to loop automatically
– support playing from RAM and streaming from FAT or EFS
– you can disable the mp3 engine if you want, to get 2 more channels

* Audio engine:

– can use the whole 16 DS channel or only the first half (so you can use an external mod player, for example)
– support standard or surround/fx mode (16 channels in standard mode (-2 if mp3), 8 in surround/fx mode (-1 if mp3))
– simple sound playing using a priority system: if no channel is available, stop a sound that has less priority than the new one to play it, or skip it if all sounds have more priority.
– possibility to reserve a particular channel so it won’t be used in the channel pool by the priority playing system. You can then manage the reserved sound channels manually.
– surround or pseudo-reverb can be activated per sound (works great with mono sounds)
– support real-time volume, panning and pitch modifications for each sound
– support sound looping

The lib comes with a template and a example of what you can do with it.

It didn’t tested it exhaustively, so feel free to report any bug.

– IPC sound system and streaming is based on cold_as_ice streaming example
– audio stream filling / mp3 decoding based on ThomasS mp3 decoding example
– ASM stereo desinterleave function was made by Thoduv

7 Comments Add your own

  • 1. Kido  |  February 26, 2008 at 1:59 pm

    sa bug dans le sfx test

  • 2. Fran  |  July 16, 2008 at 3:25 am

    Great job!!. Looks great and clean. I’m trying it right now. Although the build that comes with the package runs great on my NDS with SClite, but the FAT version doesn’t (tried with differents dldi, too). If I run into something else I’ll write again.
    Thanks again!!

  • 3. Marcio  |  December 7, 2008 at 1:39 am

    It’s a very nice library! I’ve tested ASlib.nds on DS and it worked fine. But when I tried to build the example by myself it was built ok but no sound is heard. I think my devkitarm version is the last one so what can be wrong? Thanks!

    • 4. Jakob  |  October 30, 2011 at 10:24 am

      Well, so I. Doesn’t work for me either 😦

  • 5. sogygeada  |  February 14, 2009 at 8:23 am

    Hello, I can’t understand how to add your blog ( ) in my rss reader
    sponsored link:

  • 6. Noda  |  October 30, 2011 at 11:43 am

    This library build using a way old DKP version: devkitPro r21 and libnds 20071023, newer version may not compile it because the IPC system was removed.

  • 7. Nintendo DS RPG – 6 « Benno Daenen  |  December 15, 2011 at 6:17 am

    […] de Advance Sound Library te gebruiken moest ik de ARM-compiler in mijn toolchain wel updaten, want zonder de update werden […]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

%d bloggers like this: