Mail Archives: djgpp/1999/11/01/06:16:47
Hi there,
I relise this might be a bit off topic, but the sound blaster newsgroup is
completely unhelpful, probably because my news feed is screwed.
I'm trying to program my sound blaster, and have had some success. I have
set up an ISR to handle DMA interrupts generated by the card/dma controller,
in auto-initialsed mode. The ISR performs the following steps
1 - copies the pre-mixed buffer into Real Memory Space, for the soundblaster
to access
2 - mixes samples from an array of pointers to samples (i.e. array of
unsigned chars) in blocks of 4K, puting the mixed result into the buffer.
3 - acknowledges the interrupt, and exits
All of the data used is locked, as well as the functions. The DMA will
continue playing a buffer filled with 0's, when there are no samples in the
array.
When the last sample is completed in the middle of a block, the buffer is
completed with 0's. Samples can only start at the beginning of a block.
My problem is that I get static bursts whenever I start playing a sample,
when none were playing previously, and whenever all samples finish playing.
My theory, based on the symptoms, was that padding the buffer with 0's causes
static, but I tried with other values, to no avail. I am now at my wits end
and cannot find a cause, much less a cure for the static!
Any help appreciated
Thanx
James
- Raw text -