#173881 - gelinlonlin - Thu May 06, 2010 11:45 am
I am do a GBA mod player now,and i have seen this:http://deku.gbadev.org/program.html
Now, i have a problem.In deku's code,there is a DMA3 using for sound.
I can not understand it.like i=0, for what?
IN sound.c:
s32 i, curChn;
// If you want to use a higher frequency than 18157,
// you'll need to make this bigger.
// To be safe, it would be best to set it to the buffer
// size of the highest frequency we allow in freqTable
s16 tempBuffer[304];
// zero as much of the buffer as we'll actually use,
// rounding samples up to nearest 2 for memset32
i = 0;
Dma3(tempBuffer, &i, (samplesToMix+1)*sizeof(s16)/4, DMA_MEMSET32);
thanks for explaining.
Now, i have a problem.In deku's code,there is a DMA3 using for sound.
I can not understand it.like i=0, for what?
IN sound.c:
s32 i, curChn;
// If you want to use a higher frequency than 18157,
// you'll need to make this bigger.
// To be safe, it would be best to set it to the buffer
// size of the highest frequency we allow in freqTable
s16 tempBuffer[304];
// zero as much of the buffer as we'll actually use,
// rounding samples up to nearest 2 for memset32
i = 0;
Dma3(tempBuffer, &i, (samplesToMix+1)*sizeof(s16)/4, DMA_MEMSET32);
thanks for explaining.