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 > Krawall clicking when put into v-sync int

#100469 - DiscoStew - Mon Aug 28, 2006 3:05 am

I got Krawall working pretty well, but with the current setup I had, I was calling the kramWorker function after my vsync function, which would be something similar like this....

Code:
while(1)
{
   BIOS_VSync();
   kramWorker();
}


....with the kradInterrupt function placed right into my IntrTable array for Timer 1 for smooth non-clicky audio.

Now, this is fine and dandy, except when I load scenes in my project. When I do this, the audio pretty much pauses (or locks on specific audio data) until the scene is loaded, of which then the audio works again. This is because the kramWorker function is not called during that scene loading period.

So, the idea was to place this function into my VSync function that is called when the VSync is called. When I did that, the audio works, but I got a light click every 3 seconds or so. Searching through the forums, I came upon this topic. Whether or not this was my answer, I did not know, but it didn't hurt to try. Now, my project doesn't contain a separate crt0.o file, but I did take the one that was with the Krawall example. However, after building my project, I remembered that DevKitARM has it's own crt0.o file, and the 2 clashed. Unsure of what to do from here on out, I'm asking here. Is there a way to ignore the crt0.o file in DevKitARM, and have it redirected to the one I supply for my project?

I don't feel like messing with anything in the DevKitARM folder as I want to make everything I do available within my own project folder, mainly if I move my work from computer to computer.

EDIT:

Very silly of me. I had forgotten of the "single_int.s" that I had which handled interupts, but the Krawall example was using Multiple Interrupts. Well, I began experimenting (forgive me for doing this). I put the editted piece (which was found in the topic above) into my "single_int.s" file. It worked great.....except when I tried on hardware. Pretty much the "white screen of death", with clicking. I then made a new Interrupt file just for Multiple Interrupts, swapping out the "single_int.s" file I had. Seemed to work, but now in the VSync function that is called, it now makes a slight pause between scene loading, something that was only affected by calling the worker function outside the VSync interrupt function.

I'm really getting frustrated by all this. I can't just use the entire crt0.s file from the Krawall example, as the compiler uses the "gba_crt0.s" file in the DevKitARM folder. Only sure way I think this would work is by, of course, messing with that folder....
_________________
DS - It's all about DiscoStew