Mail Archives: djgpp/1997/06/28/18:36:11
At 10:14 AM 6/26/97 -0600, you wrote:
>So it seems to be a problem of speed on the ISR handler routine,
>which is totally in C (no assembly)... but Allegro and MikMod sources
>doesn't use assembler language enough and they do not make this
>kind of noise (MikMod makes some clicks on my 486... on my pentium
>I've not try it yet)
>If I'm right and the last hypothesis is the correct... but can I do?
>I want to use functions from the standard library as cprintf...
OK. Somebody correct me if I'm wrong, but two things come to mind:
1. A big DMA buffer can work to your disadvantage as much as a
tiny buffer. Don't forget that among other things there's
interrupt overhead as well as sections of code which may
disable hardware interrupts.
2. It's much faster to reprogram the DMA to a different memory
address than it is to copy the new buffer on top of the old
My plan (although I've never tried it), would be to set up two DMA
buffers and cycle between them. On a soundcard IRQ, you'll just
reprogram the DMA to the other buffer, and then transfer new data
to your old one. That way, you're not so hard pressed for time.
- Raw text -