Sound on the nds

Before the last update, devkitpro release 27, we had to do sound using SOX in tht terminal window.

Now we use maxmod, http://maxmod.org/ (api: http://maxmod.org/ref/ )

Basically having the right setup you can use .wav files.

Auke asked me where the soundbank.h file could be found. Well this file is generated by the MAKEFILE itself:

there is a special line for this in the MAKEFILE:

#———————————————————————————
# rule to build soundbank from music files
#———————————————————————————
soundbank.bin : $(AUDIOFILES)
#———————————————————————————
@mmutil $^ -d -osoundbank.bin -hsoundbank.h

and you can find the soundbank.h in the build folder, after buidling (make command in Programmer’s NotePad)

Also the header file for the .wav files are generated by the MAKEFILE.

export AUDIOFILES    :=    $(foreach dir,$(notdir $(wildcard $(MUSIC)/*.*)),$(CURDIR)/$(MUSIC)/$(dir))

and the folder where to find the sound data:

MUSIC       :=  maxmod_data

The interplay between header files of media (image and sound) and the MAKEFILE is something you have to get used to. Using the MAKEFILE template everything is taken care of in principle.

All is explained excellently on this page: http://maxmod.org/ref/tut/dsprog.html

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: