st->st_low = nb_encoder_init(mode->nb_mode);
st->st_low = speex_encoder_init(mode->nb_mode);
void *sb_encoder_init(SpeexMode *m){   int i;   SBEncState *st;   SpeexSBMode *mode;   st = (SBEncState*)speex_alloc(sizeof(SBEncState));   st->mode = m;   mode = (SpeexSBMode*)m->mode;   st->st_low = nb_encoder_init(mode->nb_mode);   st->full_frame_size = 2*mode->frameSize;   st->frame_size = mode->frameSize;   st->subframeSize = mode->subframeSize;   st->nbSubframes = mode->frameSize/mode->subframeSize;   st->windowSize = st->frame_size*3/2;   st->lpcSize=mode->lpcSize;   st->bufSize=mode->bufSize;   st->submodes=mode->submodes;   st->submodeID=mode->defaultSubmode;   {      int mod=6;      speex_encoder_ctl(st->st_low, SPEEX_SET_MODE, &mod);   }   st->lag_factor = mode->lag_factor;   st->lpc_floor = mode->lpc_floor;   st->gamma1=mode->gamma1;   st->gamma2=mode->gamma2;   st->first=1;   st->stack = speex_alloc(10000*sizeof(float));   st->x0d=(float*)speex_alloc(st->frame_size*sizeof(float));   st->x1d=(float*)speex_alloc(st->frame_size*sizeof(float));   st->high=(float*)speex_alloc(st->full_frame_size*sizeof(float));   st->y0=(float*)speex_alloc(st->full_frame_size*sizeof(float));   st->y1=(float*)speex_alloc(st->full_frame_size*sizeof(float));   st->h0_mem=(float*)speex_alloc(QMF_ORDER*sizeof(float));   st->h1_mem=(float*)speex_alloc(QMF_ORDER*sizeof(float));   st->g0_mem=(float*)speex_alloc(QMF_ORDER*sizeof(float));   st->g1_mem=(float*)speex_alloc(QMF_ORDER*sizeof(float));   st->buf=(float*)speex_alloc(st->windowSize*sizeof(float));   st->excBuf=(float*)speex_alloc(st->bufSize*sizeof(float));   st->exc = st->excBuf + st->bufSize - st->windowSize;   st->res=(float*)speex_alloc(st->frame_size*sizeof(float));   st->sw=(float*)speex_alloc(st->frame_size*sizeof(float));   st->target=(float*)speex_alloc(st->frame_size*sizeof(float));   /*Asymetric "pseudo-Hamming" window*/   {      int part1, part2;      part1 = st->subframeSize*7/2;      part2 = st->subframeSize*5/2;      st->window = (float*)speex_alloc(st->windowSize*sizeof(float));      for (i=0;i<part1;i++)         st->window[i]=.54-.46*cos(M_PI*i/part1);      for (i=0;i<part2;i++)         st->window[part1+i]=.54+.46*cos(M_PI*i/part2);   }   st->lagWindow = (float*)speex_alloc((st->lpcSize+1)*sizeof(float));   for (i=0;i<st->lpcSize+1;i++)      st->lagWindow[i]=exp(-.5*sqr(2*M_PI*st->lag_factor*i));   st->rc = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->autocorr = (float*)speex_alloc((st->lpcSize+1)*sizeof(float));   st->lpc = (float*)speex_alloc((st->lpcSize+1)*sizeof(float));   st->bw_lpc1 = (float*)speex_alloc((st->lpcSize+1)*sizeof(float));   st->bw_lpc2 = (float*)speex_alloc((st->lpcSize+1)*sizeof(float));   st->lsp = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->qlsp = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->old_lsp = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->old_qlsp = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->interp_lsp = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->interp_qlsp = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->interp_lpc = (float*)speex_alloc((st->lpcSize+1)*sizeof(float));   st->interp_qlpc = (float*)speex_alloc((st->lpcSize+1)*sizeof(float));   st->mem_sp = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->mem_sp2 = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->mem_sw = (float*)speex_alloc(st->lpcSize*sizeof(float));   st->complexity=2;   return st;}