Mail Archives: djgpp/1999/11/01/17:28:34
>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
- Raw text -