float *e = (float*)ptr;
spx_sig_t *e = (spx_sig_t*)ptr;
int nb_decoder_ctl(void *state, int request, void *ptr){   DecState *st;   st=(DecState*)state;   switch(request)   {   case SPEEX_SET_LOW_MODE:   case SPEEX_SET_MODE:      st->submodeID = (*(int*)ptr);      break;   case SPEEX_GET_LOW_MODE:   case SPEEX_GET_MODE:      (*(int*)ptr) = st->submodeID;      break;   case SPEEX_SET_ENH:      st->lpc_enh_enabled = *((int*)ptr);      break;   case SPEEX_GET_ENH:      *((int*)ptr) = st->lpc_enh_enabled;      break;   case SPEEX_GET_FRAME_SIZE:      (*(int*)ptr) = st->frameSize;      break;   case SPEEX_GET_BITRATE:      if (st->submodes[st->submodeID])         (*(int*)ptr) = st->sampling_rate*SUBMODE(bits_per_frame)/st->frameSize;      else         (*(int*)ptr) = st->sampling_rate*(NB_SUBMODE_BITS+1)/st->frameSize;      break;   case SPEEX_SET_SAMPLING_RATE:      st->sampling_rate = (*(int*)ptr);      break;   case SPEEX_GET_SAMPLING_RATE:      (*(int*)ptr)=st->sampling_rate;      break;   case SPEEX_SET_HANDLER:      {         SpeexCallback *c = (SpeexCallback*)ptr;         st->speex_callbacks[c->callback_id].func=c->func;         st->speex_callbacks[c->callback_id].data=c->data;         st->speex_callbacks[c->callback_id].callback_id=c->callback_id;      }      break;   case SPEEX_SET_USER_HANDLER:      {         SpeexCallback *c = (SpeexCallback*)ptr;         st->user_callback.func=c->func;         st->user_callback.data=c->data;         st->user_callback.callback_id=c->callback_id;      }      break;   case SPEEX_RESET_STATE:      {         int i;         for (i=0;i<2*st->lpcSize;i++)            st->mem_sp[i]=0;         for (i=0;i<st->bufSize;i++)            st->excBuf[i]=st->inBuf[i]=0;      }      break;   case SPEEX_SET_SUBMODE_ENCODING:      st->encode_submode = (*(int*)ptr);      break;   case SPEEX_GET_SUBMODE_ENCODING:      (*(int*)ptr) = st->encode_submode;      break;   case SPEEX_GET_PI_GAIN:      {         int i;         float *g = (float*)ptr;         for (i=0;i<st->nbSubframes;i++)            g[i]=st->pi_gain[i];      }      break;   case SPEEX_GET_EXC:      {         int i;         float *e = (float*)ptr;         for (i=0;i<st->frameSize;i++)            e[i]=st->exc[i];      }      break;   case SPEEX_GET_INNOV:      {         int i;         float *e = (float*)ptr;         for (i=0;i<st->frameSize;i++)            e[i]=st->innov[i];      }      break;   case SPEEX_GET_DTX_STATUS:      *((int*)ptr) = st->dtx_enabled;      break;   default:      speex_warning_int("Unknown nb_ctl request: ", request);      return -1;   }   return 0;}