From: "Elias Pschernig" Newsgroups: comp.os.msdos.djgpp Subject: Re: sound blaster code Date: Mon, 1 Nov 1999 22:19:57 +0100 Organization: Telenor magnet GmbH Lines: 30 Message-ID: <7vl062$sm2$1@orudios.magnet.at> References: <941451872 DOT 692273 AT mars DOT cs DOT unp DOT ac DOT za> NNTP-Posting-Host: 195.170.72.29 X-Trace: orudios.magnet.at 941491202 29378 195.170.72.29 (1 Nov 1999 21:20:02 GMT) X-Complaints-To: abuse AT magnet DOT at NNTP-Posting-Date: 1 Nov 1999 21:20:02 GMT X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >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! You should try 128 for 8bit and 32768 for 16bit samples, they are the zero values for unsigned data i think. Anyways, i tried to program the same thing a while back, and it never really worked until someone pointed me to the source code of the allegro library. Just look for files like sb16.c or mixer.c, they are documented and have code that works perfectly. I think you can extract all needed information out of it. (I stopped programming at that time and am using the allegro library now...) hth, Elias Pschernig