cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/30/15:31:16

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sound
Date: Thu, 30 Apr 1998 19:42:32 +0100
Organization: None
Message-ID: <bhWRyNAYYMS1Ew9i@talula.demon.co.uk>
References: <199804292105 DOT XAA07727 AT legolas DOT mdh DOT se>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 19
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

=?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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019