st->seed = 1000;
void *nb_decoder_init(const SpeexMode *m){   DecState *st;   const SpeexNBMode *mode;   int i;   mode=(const SpeexNBMode*)m->mode;#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)   st = (DecState *)speex_alloc(sizeof(DecState));   if (!st)      return NULL;   st->stack = NULL;#else   st = (DecState *)speex_alloc(sizeof(DecState)+NB_DEC_STACK);   if (!st)      return NULL;   st->stack = ((char*)st) + sizeof(DecState);#endif   st->mode=m;   st->encode_submode = 1;#ifdef EPIC_48K   st->lbr_48k=mode->lbr48k;#endif   st->first=1;   /* Codec parameters, should eventually have several "modes"*/   st->frameSize = mode->frameSize;   st->nbSubframes=mode->frameSize/mode->subframeSize;   st->subframeSize=mode->subframeSize;   st->lpcSize = mode->lpcSize;   st->min_pitch=mode->pitchStart;   st->max_pitch=mode->pitchEnd;   st->submodes=mode->submodes;   st->submodeID=mode->defaultSubmode;   st->lpc_enh_enabled=0;   st->inBuf = speex_alloc((st->frameSize)*sizeof(spx_sig_t));   st->frame = st->inBuf;   st->excBuf = speex_alloc((st->frameSize + st->max_pitch + 1)*sizeof(spx_sig_t));   st->exc = st->excBuf + st->max_pitch + 1;   for (i=0;i<st->frameSize;i++)      st->inBuf[i]=0;   for (i=0;i<st->frameSize + st->max_pitch + 1;i++)      st->excBuf[i]=0;   st->innov = speex_alloc((st->frameSize)*sizeof(spx_sig_t));   st->interp_qlpc = speex_alloc(st->lpcSize*sizeof(spx_coef_t));   st->qlsp = speex_alloc(st->lpcSize*sizeof(spx_lsp_t));   st->old_qlsp = speex_alloc(st->lpcSize*sizeof(spx_lsp_t));   st->interp_qlsp = speex_alloc(st->lpcSize*sizeof(spx_lsp_t));   st->mem_sp = speex_alloc((5*st->lpcSize)*sizeof(spx_mem_t));   st->comb_mem = speex_alloc(sizeof(CombFilterMem));   comb_filter_mem_init (st->comb_mem);   st->pi_gain = speex_alloc((st->nbSubframes)*sizeof(spx_word32_t));   st->last_pitch = 40;   st->count_lost=0;   st->pitch_gain_buf[0] = st->pitch_gain_buf[1] = st->pitch_gain_buf[2] = 0;   st->pitch_gain_buf_idx = 0;   st->sampling_rate=8000;   st->last_ol_gain = 0;   st->user_callback.func = &speex_default_user_handler;   st->user_callback.data = NULL;   for (i=0;i<16;i++)      st->speex_callbacks[i].func = NULL;   st->voc_m1=st->voc_m2=st->voc_mean=0;   st->voc_offset=0;   st->dtx_enabled=0;#ifdef ENABLE_VALGRIND   VALGRIND_MAKE_READABLE(st, (st->stack-(char*)st));#endif   return st;}