out[0] = st->frame[0] + st->preemph*st->pre_mem; for (i=1;i<st->frameSize;i++) out[i]=st->frame[i] + st->preemph*out[i-1]; st->pre_mem=out[st->frameSize-1];
void decode(DecState *st, FrameBits *bits, float *out){   int i, sub;   memmove(st->inBuf, st->inBuf+st->frameSize, (st->bufSize-st->frameSize)*sizeof(float));   memmove(st->excBuf, st->excBuf+st->frameSize, (st->bufSize-st->frameSize)*sizeof(float));   st->lsp_unquant(st->qlsp, st->lpcSize, bits);   if (st->first)   {      for (i=0;i<st->lpcSize;i++)         st->old_qlsp[i] = st->qlsp[i];   }   printf ("decode LSPs: ");   for (i=0;i<st->lpcSize;i++)      printf ("%f ", st->qlsp[i]);   printf ("\n");   /*Loop on subframes */   for (sub=0;sub<st->nbSubframes;sub++)   {      int offset;      float *sp, *exc, tmp;            /* Offset relative to start of frame */      offset = st->subframeSize*sub;      /* Original signal */      sp=st->frame+offset;      /* Excitation */      exc=st->exc+offset;      /* LSP interpolation (quantized and unquantized) */      tmp = (.5 + sub)/st->nbSubframes;      for (i=0;i<st->lpcSize;i++)         st->interp_qlsp[i] = (1-tmp)*st->old_qlsp[i] + tmp*st->qlsp[i];      /* Compute interpolated LPCs (unquantized) */      for (i=0;i<st->lpcSize;i++)         st->interp_qlsp[i] = cos(st->interp_qlsp[i]);      lsp_to_lpc(st->interp_qlsp, st->interp_qlpc, st->lpcSize, st->stack);      /* Reset excitation */      for (i=0;i<st->subframeSize;i++)         exc[i]=0;      /*Adaptive codebook contribution*/      st->ltp_unquant(exc, st->min_pitch, st->max_pitch, st->ltp_params, st->subframeSize, bits, st->stack);             /*Fixed codebook contribution*/      st->innovation_unquant(exc, st->innovation_params, st->subframeSize, bits, st->stack);      /*Compute decoded signal*/      syn_filt_mem(exc, st->interp_qlpc, sp, st->subframeSize, st->lpcSize, st->mem_sp);   }      /*Copy output signal*/   for (i=0;i<st->frameSize;i++)      out[i]=st->frame[i];   /* Store the LSPs for interpolation in the next frame */   for (i=0;i<st->lpcSize;i++)      st->old_qlsp[i] = st->qlsp[i];   /* The next frame will not be the first (Duh!) */   st->first = 0;}