st->reverb_estimate[i]=0.;
SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate){   int i;   int N, N3, N4;   SpeexPreprocessState *st = (SpeexPreprocessState *)speex_alloc(sizeof(SpeexPreprocessState));   st->frame_size = frame_size;   /* Round ps_size down to the nearest power of two */#if 0   i=1;   st->ps_size = st->frame_size;   while(1)   {      if (st->ps_size & ~i)      {         st->ps_size &= ~i;         i<<=1;      } else {         break;      }   }         if (st->ps_size < 3*st->frame_size/4)      st->ps_size = st->ps_size * 3 / 2;#else   st->ps_size = st->frame_size;#endif   N = st->ps_size;   N3 = 2*N - st->frame_size;   N4 = st->frame_size - N3;      st->sampling_rate = sampling_rate;   st->denoise_enabled = 1;   st->agc_enabled = 0;   st->agc_level = 8000;   st->vad_enabled = 0;   st->frame = (float*)speex_alloc(2*N*sizeof(float));   st->ps = (float*)speex_alloc(N*sizeof(float));   st->gain2 = (float*)speex_alloc(N*sizeof(float));   st->window = (float*)speex_alloc(2*N*sizeof(float));   st->noise = (float*)speex_alloc(N*sizeof(float));   st->old_ps = (float*)speex_alloc(N*sizeof(float));   st->gain = (float*)speex_alloc(N*sizeof(float));   st->prior = (float*)speex_alloc(N*sizeof(float));   st->post = (float*)speex_alloc(N*sizeof(float));   st->loudness_weight = (float*)speex_alloc(N*sizeof(float));   st->inbuf = (float*)speex_alloc(N3*sizeof(float));   st->outbuf = (float*)speex_alloc(N3*sizeof(float));   st->echo_noise = (float*)speex_alloc(N*sizeof(float));   st->S = (float*)speex_alloc(N*sizeof(float));   st->Smin = (float*)speex_alloc(N*sizeof(float));   st->Stmp = (float*)speex_alloc(N*sizeof(float));   st->update_prob = (float*)speex_alloc(N*sizeof(float));   st->zeta = (float*)speex_alloc(N*sizeof(float));   st->Zpeak = 0;   st->Zlast = 0;   st->noise_bands = (float*)speex_alloc(NB_BANDS*sizeof(float));   st->noise_bands2 = (float*)speex_alloc(NB_BANDS*sizeof(float));   st->speech_bands = (float*)speex_alloc(NB_BANDS*sizeof(float));   st->speech_bands2 = (float*)speex_alloc(NB_BANDS*sizeof(float));   st->noise_bandsN = st->speech_bandsN = 1;   conj_window(st->window, 2*N3);   for (i=2*N3;i<2*st->ps_size;i++)      st->window[i]=1;      if (N4>0)   {      for (i=N3-1;i>=0;i--)      {         st->window[i+N3+N4]=st->window[i+N3];         st->window[i+N3]=1;      }   }   for (i=0;i<N;i++)   {      st->noise[i]=1e4;      st->old_ps[i]=1e4;      st->gain[i]=1;      st->post[i]=1;      st->prior[i]=1;   }   for (i=0;i<N3;i++)   {      st->inbuf[i]=0;      st->outbuf[i]=0;   }   for (i=0;i<N;i++)   {      float ff=((float)i)*.5*sampling_rate/((float)N);      st->loudness_weight[i] = .35-.35*ff/16000+.73*exp(-.5*(ff-3800)*(ff-3800)/9e5);      if (st->loudness_weight[i]<.01)         st->loudness_weight[i]=.01;      st->loudness_weight[i] *= st->loudness_weight[i];   }   st->speech_prob = 0;   st->last_speech = 1000;   st->loudness = pow(6000,LOUDNESS_EXP);   st->loudness2 = 6000;   st->nb_loudness_adapt = 0;   st->fft_lookup = (struct drft_lookup*)speex_alloc(sizeof(struct drft_lookup));   drft_init(st->fft_lookup,2*N);   st->nb_adapt=0;   st->consec_noise=0;   st->nb_preprocess=0;   return st;}