From: jdominy AT mars DOT cs DOT unp DOT ac DOT za (James Dominy) Subject: sound blaster code Newsgroups: comp.os.msdos.djgpp Organization: CS and IS, Univ of Natal, PMB Keywords: Sound Blaster, programming X-Newsreader: TIN [version 1.2 PL2] Message-ID: <941451872.692273@mars.cs.unp.ac.za> Cache-Post-Path: mars.cs.unp.ac.za!jdominy AT mars DOT cs DOT unp DOT ac DOT za X-Cache: nntpcache 2.3.2.1 (see http://www.nntpcache.org/) Cache-Post-Path: Raven!news AT mars DOT cs DOT unp DOT ac DOT za X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Cache-Post-Path: banana.uni.net.za!unknown AT raven DOT und DOT ac DOT za X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Date: 01 Nov 1999 10:24:34 GMT NNTP-Posting-Host: 196.10.251.2 X-Trace: wits.uni.net.za 941451874 253 196.10.251.2 Lines: 34 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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