use original dsssframesync code
There's no need to call a function to call another function once per sample. This reverts The functionality to how it was before broke it
@@ -264,32 +264,31 @@ int dsssframesync_set_header_props(dsssframesync _q, dsssframegenprops_s * _prop
return dsssframesync_set_header_len(_q, _q->header_user_len);
}
-int dsssframesync_execute_sample(dsssframesync _q, float complex _x)
+int dsssframesync_execute(dsssframesync _q, float complex * _x, unsigned int _n)
{
+ unsigned int i;
+ for (i = 0; i < _n; i++) {
switch (_q->state) {
case DSSSFRAMESYNC_STATE_DETECTFRAME:
// detect frame (look for p/n sequence)
- return dsssframesync_execute_seekpn(_q, _x);
+ dsssframesync_execute_seekpn(_q, _x[i]);
+ break;
case DSSSFRAMESYNC_STATE_RXPREAMBLE:
// receive p/n sequence symbols
- return dsssframesync_execute_rxpreamble(_q, _x);
+ dsssframesync_execute_rxpreamble(_q, _x[i]);
+ break;
case DSSSFRAMESYNC_STATE_RXHEADER:
// receive header symbols
- return dsssframesync_execute_rxheader(_q, _x);
+ dsssframesync_execute_rxheader(_q, _x[i]);
+ break;
case DSSSFRAMESYNC_STATE_RXPAYLOAD:
// receive payload symbols
- return dsssframesync_execute_rxpayload(_q, _x);
+ dsssframesync_execute_rxpayload(_q, _x[i]);
+ break;
default:
return liquid_error(LIQUID_EINT,"dsssframesync_execute(), invalid internal state");
}
}
-
-int dsssframesync_execute(dsssframesync _q, float complex * _x, unsigned int _n)
-{
- unsigned int i;
- for (i = 0; i < _n; i++) {
- dsssframesync_execute_sample(_q, _x[i]);
- }
return LIQUID_OK;
}
