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.

Audio > Audio Sampling

#5301 - Ninja - Thu Apr 24, 2003 9:51 pm

I just have a quick question.... I have been playing around with the wave output on the GBA for a while, and have been dissatisfied with the sound quality I am getting.

I am feeding it an 8kHz PCM wave file, and of course the quality sucks, but it's sounding even worse on the GBA. I think it's in all likelihood because I am casting the s8 data as a u32 in my playback function. The problem is that I can't seem to get around doing this, as the register (DMA1SAD) takes u32 data as far as I know... am I mistaken on this?

To show what I am talking about, here's a sample of what I am doing, along with the original wave.
http://members.shaw.ca/rebirth1/Cow.zip

So does anyone know a better way of doing this? Thanks in advance.... (no pun intended)

#5302 - col - Thu Apr 24, 2003 10:46 pm

you nead to pack 4 8bit samples int each u32

Cheers

Col

#5312 - Ninja - Fri Apr 25, 2003 3:18 am

Thank you very much for your help. I seem to have gotten it working, but I have used up all my available memory and more by doing it. Looks like it's time to think up an efficient algorithm. :)

#5322 - Maddox - Fri Apr 25, 2003 7:34 am

Shouldn't be any problem for a ninja.
_________________
You probably suck. I hope you're is not a game programmer.

#5336 - Ninja - Fri Apr 25, 2003 2:52 pm

Oh of course not. I have assassinated bigger bugs than this one without issue. ;)

#5339 - Daikath - Fri Apr 25, 2003 3:49 pm

*Daikath sees the Ninja coming at him with long exadurated moves with his sword.*

erhm,,

*Daikath gets bored and shoots him*
_________________
?There are no stupid questions but there are a LOT of inquisitive idiots.?

#5354 - Ninja - Fri Apr 25, 2003 11:25 pm

Damnit man! That wasn't very nice. You put a dent in my favorite Kodachi!

*Throws 5 shuriken at Daikath*