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

Alfrédo Moreira
Fri, 06 Aug 2004 15:02:08 -0000

I have a simple question:

I want to mix N samples of 20ms  into one sample of 20ms...is the
algorithm above exact? :

short inputsamples[160][N];
short outputsample[160];
int i,j;
for(i=0;i<160;++i){
outputsample[i] = 0;
for(j=0;j<N;++j){
outputsample[i]  +=  inputsample[i][j];
}
outputsample[i] /= N;
}