gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > some newbie questions about audio decoding

#99112 - fishhf - Sat Aug 19, 2006 4:28 pm

I've recenty bought a nds lite with a supercard mini sd.
I tried some media players, but it lacks an equalizer.
I wanna start making my own audio player with some bass and treble controls.

First, how do I access files on the mini sd card? does libfat support it?

Because the DS's cpu may not be fast enough to do realtime audio decoding with the sound enhancements, I may do some predecoding onto the mini sd, will the mini sd die fast if I do that? (i'll put raw pcm on it)

Or, I could speed up the audio decoding by using both CPU?

thanks ^^

#99116 - Sausage Boy - Sat Aug 19, 2006 4:41 pm

I'm almost certain libfat supports SC MiniSD.

Have a look at Tremor and Helix, they are two libraries for decoding ogg and mp3. Since the DS lacks an FPU, floating point math is incredibly slow. I'd have these run on the arm9, I'm almost certain it can handle it.

I don't know exactly how equalizing is done in other media players, but I suppose you can just run some kind of algorithm on the output you get from your media playing lib. Just make sure you don't use any floats.

I don't think the arm9 will have any problem handling these two tasks, but you could probably run the equalizer on the arm7 if you want to, perhaps to free up cpu time for cool visualization effects.
_________________
"no offense, but this is the gayest game ever"

#99187 - TheChuckster - Sat Aug 19, 2006 11:43 pm

It seems like everyone that has had any luck playing MP3s in real time has used libmad. Floating point ops are SLOW even on ARM9 (which is only 66 mhz to begin with).

#99192 - Sausage Boy - Sun Aug 20, 2006 12:30 am

Huh, does libmad support fixed point? Helix is apperently slightly arm targeted, so I figured it would be good, I've never tried it though.
_________________
"no offense, but this is the gayest game ever"

#99406 - fishhf - Mon Aug 21, 2006 12:35 pm

hmm,,,is there some kind of callback which will be called when i need to fill the sound buffer? or it's some kind of interupt??