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;
void nb_decoder_ctl(void *state, int request, void *ptr){   DecState *st;   st=(DecState*)state;   switch(request)   {   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) = 50*SUBMODE(bits_per_frame);      else         (*(int*)ptr) = 50*(NB_SUBMODE_BITS+1);      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;   default:      fprintf(stderr, "Unknown nb_ctl request: %d\n", request);   }}