[Speex-dev] mixing N sounds together...

Ralph Giles giles
Tue Jun 15 00:53:15 PDT 2004


On Sun, Jun 13, 2004 at 06:42:23PM +0200, Alfr?do Moreira wrote:

> short outputsample[160];
> [...]
>        outputsample[i]  +=  inputsample[i][j];

Also note that if your samples are 16 bit integers, you'll want to
use something larger than 16 for teh accumulation, say a temporary
int sample; Otherwise you can saturate even if you divide by N;

HTH,
-r


More information about the Speex-dev mailing list