Sound

The SDK's sound library has two sides. The game's side sends lists of commands over the FIFO and shares a block of main memory. The ARM7's side is the driver: it plays sequences (SSEQ) with their banks and waves through the sound hardware. src/nds/hle/sound.c is that driver, ported from melonDS's high-level ARM7: the commands, the sequence player with its tracks and note operations, the channels' envelopes, sweeps and modulation, and the alarms. It runs every 5.2 ms of the board's time, as the driver's timer has it.

src/nds/audio/spu.c is the sound hardware the driver plays through: sixteen channels (PCM, ADPCM, the square waves and the noise channels) mixed to stereo at the console's rate, 32728.5 Hz. SDK 2.0's sound library numbers its commands in two other ways (its early builds and its later ones), which the program's SDK version tells.


Made from docs/platforms/nds/README.md at 69237645142c. GPL-3.0-or-later.