printf ("unquant_energy: %d %f\n", q_energy, ener);
void nb_decode(void *state, FrameBits *bits, float *out){   DecState *st;   int i, sub;   st=state;   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];   }   /*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);      tmp=1;      st->pi_gain[sub]=0;      for (i=0;i<=st->lpcSize;i++)      {         st->pi_gain[sub] += tmp*st->interp_qlpc[i];         tmp = -tmp;      }      /* 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);            {         int q_energy;         float ener;         float *innov;                  innov = PUSH(st->stack, st->subframeSize);         for (i=0;i<st->subframeSize;i++)            innov[i]=0;         q_energy = speex_bits_unpack_unsigned(bits, 6);         ener = exp(q_energy/7.0);         printf ("unquant_energy: %d %f\n", q_energy, ener);                  /*Fixed codebook contribution*/         st->innovation_unquant(innov, st->innovation_params, st->subframeSize, bits, st->stack);         for (i=0;i<st->subframeSize;i++)            exc[i]+=ener*innov[i];         POP(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];   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];   /* 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;}