static inline int demodulador(fsk_data *fskd, float *retval, float x) { float xS,xM; fskd->cola_in[fskd->pcola]=x; xS=filtroS(fskd,x); xM=filtroM(fskd,x); fskd->cola_filtro[fskd->pcola]=xM-xS; x=filtroL(fskd,xM*xM - xS*xS); fskd->cola_demod[fskd->pcola++]=x; fskd->pcola &= (NCOLA-1); *retval = x; return(0); }
int demodulador(ZAP *zap, float *retval) { float x,xS,xM; if (get_audio_sample(zap,&x)) return(-1); zap->fskd.cola_in[zap->fskd.pcola]=x; xS=filtroS(zap,x); xM=filtroM(zap,x); zap->fskd.cola_filtro[zap->fskd.pcola]=xM-xS; x=filtroL(zap,xM*xM - xS*xS); zap->fskd.cola_demod[zap->fskd.pcola++]=x; zap->fskd.pcola &= (NCOLA-1); *retval = x; return(0); }