Mail Archives: djgpp/1998/04/30/15:31:16
=?ISO-8859-1?Q?Magnus_Lindstr=F6m?= writes:
>I'm diving further into sound programming and just got the wav part
>to work.. Now i've been looking for info about sound mixing for
>hours without finding anything comprehensible.. Is there someone out
>there who holds the secret or know where it is?
It is very simple: just average all your samples values together (add
them and divide by the number of voices). This will make the sounds
quieter, so you may prefer to divide by some number less than the real
number of voices and then clamp if the result overflows the valid sample
range: this will introduce some distortion at extreme levels, but
improves the quality of the more normal central values.
btw. this question is really offtopic for a djgpp newsgroup...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Pigs use it for a tambourine" - Frank Zappa
- Raw text -