View unanswered posts | View active topics It is currently Mon Dec 18, 2017 8:01 am



Reply to topic  [ 27 posts ]  Go to page 1, 2, 3  Next
 stream sound[solved] 
Author Message

Joined: Thu Jan 08, 2009 9:15 pm
Posts: 82
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 :oops: :


Last edited by Tomdev on Sat Jul 11, 2009 7:04 pm, edited 3 times in total.



Thu Mar 05, 2009 9:02 pm
Profile

Joined: Sat Dec 06, 2008 6:07 pm
Posts: 65
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.


Fri Mar 06, 2009 6:59 am
Profile WWW

Joined: Thu Jan 08, 2009 9:15 pm
Posts: 82
ok, another question then, how could i load my module files into memory to play them? :roll:


Fri Mar 06, 2009 7:19 am
Profile

Joined: Sat Dec 06, 2008 6:07 pm
Posts: 65
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


Fri Mar 06, 2009 11:39 am
Profile WWW

Joined: Thu Jan 08, 2009 9:15 pm
Posts: 82
and could i place this soundbank on my sd card an load it?


Fri Mar 06, 2009 6:47 pm
Profile

Joined: Sat Dec 06, 2008 6:07 pm
Posts: 65
Yes, mmInitDefault("filename") will initialize maxmod to use a soundbank on the card.


Fri Mar 06, 2009 11:32 pm
Profile WWW

Joined: Thu Jan 08, 2009 9:15 pm
Posts: 82
thanks ekid i'm going to test it


Sat Mar 07, 2009 7:49 am
Profile

Joined: Thu Jan 08, 2009 9:15 pm
Posts: 82
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)


Mon Mar 09, 2009 7:53 pm
Profile

Joined: Sat Dec 06, 2008 6:07 pm
Posts: 65
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).


Tue Mar 10, 2009 12:17 pm
Profile WWW

Joined: Thu Jan 08, 2009 9:15 pm
Posts: 82
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?


Fri Mar 20, 2009 8:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 27 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads