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 > DMA crashes?

#3661 - Alunze - Tue Mar 04, 2003 1:06 pm

Hi, I'm writing my little game and got everything to work, except the sound department. It sounds nice and all, using DMA and the VBLANK interrupt to count the samples and stop the sound when the clip has finished. The problem is, by some unknown reason to me, this causes some sporadic crashes, sometimes filling the screen with garbage. I've fiddled with the code and realized the game only crashes when I used the DMA, else it runs fine (with no sound). Has anyone an idea of what can be causing this? I've not mentioned the game only crashes if flashed on a cart, it runs fine on emulators, so I guess this must be due to some obscure (maybe not that much) hardware issue I should have consideded. I can post my sound code if needed, I just didn't do it in case the solution is somewhat obvious ^_^U and to avoid cluttering the message.

Thanks in *advance* (heh heh) XD

#3663 - gb_feedback - Tue Mar 04, 2003 2:27 pm

Don't know exactly what you're doing but most of my crashes with sound I put down to not finishing one frame's worth of processing before the next frame. Perhaps you should look at how you're spending your time when doing sound?
_________________
http://www.bookreader.co.uk/