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

Alfrédo Moreira alfredo.moreira
Sun Jun 13 09:42:23 PDT 2004


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;
}



More information about the Speex-dev mailing list