stream sound[solved]
Moderator: eKid
stream sound[solved]
ok i tried to get streaming working but I'm stuck with updating a stream. how do i do that. say i'm reading a mod file from fat into a buffer, how could i get sound out my ds? i really have no idea how to do this with the update stream function :
Last edited by Tomdev on Sat Jul 11, 2009 7:04 pm, edited 3 times in total.
Re: streaming audio
The streaming functions are meant for passing raw audio data to the DS sound output. MOD files don't contain a raw stream of audio, but rather a small set of samples and some data containing info on how to play the sounds in a sequence (maxmod has other routines to play MOD files).
There is a streaming example in the devkitPro examples that shows how to open an audio stream and feed it a synthensized sound.
There is a streaming example in the devkitPro examples that shows how to open an audio stream and feed it a synthensized sound.
Re: streaming audio
ok, another question then, how could i load my module files into memory to play them?
Re: streaming audio
First the module must be preconverted with the maxmod utility (mmutil), the utility puts all of your modules and sounds into one 'soundbank' file. This file can be used with maxmod so that you can then 'mmLoad' the song into memory and then 'mmStart' start playback.
http://www.maxmod.org/ref/tut/convguide.html - a guide on using mmutil
http://www.maxmod.org/ref/tut/dsprog.html - a guide on using maxmod for music and sound
http://www.maxmod.org/ref/tut/convguide.html - a guide on using mmutil
http://www.maxmod.org/ref/tut/dsprog.html - a guide on using maxmod for music and sound
Re: streaming audio
and could i place this soundbank on my sd card an load it?
Re: streaming audio
Yes, mmInitDefault("filename") will initialize maxmod to use a soundbank on the card.
Re: streaming audio
thanks ekid i'm going to test it
Re: streaming audio
and if i say this mmInitDefault("sound/soundbank.bin") will this work? and if so, does it load the whole soundbank into memory(that's why i want it to load from fat)
Re: streaming audio
No, with this setup only the things that you load will be in memory (mmLoad/mmLoadEffect). You can also set it up where the soundbank is linked in with the program, so everything will already be in memory (although you still need to use mmLoad/Effect).
Re: streaming audio
sorry so saying i have converted a soundbank and put it on my card(not in the rom) do i have to use a header file or can i just load the soundbank and load the modules?
Who is online
Users browsing this forum: No registered users and 3 guests