Made timing_recovery_cc build
This commit is contained in:
parent
676e9388fc
commit
2af14b8082
2 changed files with 7 additions and 6 deletions
11
csdr.c
11
csdr.c
|
@ -2349,6 +2349,7 @@ int main(int argc, char *argv[])
|
|||
//fprintf(stderr, "| o");
|
||||
TRY_YIELD;
|
||||
}
|
||||
}
|
||||
|
||||
if(!strcmp(argv[1],"timing_recovery_cc")) //<algorithm> <decimation> [--add_q]
|
||||
{
|
||||
|
@ -2373,13 +2374,13 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
FEOF_CHECK;
|
||||
timing_recovery((complexf*)input_buffer, (complexf*)output_buffer, the_bufsize, &state);
|
||||
//fprintf(stderr, "os %d\n",state->output_size);
|
||||
fwrite(output_buffer, sizeof(complexf), state->output_size, stdout);
|
||||
//fprintf(stderr, "os %d\n",state.output_size);
|
||||
fwrite(output_buffer, sizeof(complexf), state.output_size, stdout);
|
||||
fflush(stdout);
|
||||
TRY_YIELD;
|
||||
memmove((complexf*)input_buffer,((complexf*)input_buffer)+state->input_processed,(the_bufsize-state->input_processed)*sizeof(complexf)); //memmove lets the source and destination overlap
|
||||
fread(((complexf*)input_buffer)+(the_bufsize-state->input_processed), sizeof(complexf), state->input_processed, stdin);
|
||||
//fprintf(stderr,"iskip=%d state->output_size=%d start=%x target=%x skipcount=%x \n",state->input_processed,state->output_size,input_buffer, ((complexf*)input_buffer)+(BIG_BUFSIZE-state->input_processed),(BIG_BUFSIZE-state->input_processed));
|
||||
memmove((complexf*)input_buffer,((complexf*)input_buffer)+state.input_processed,(the_bufsize-state.input_processed)*sizeof(complexf)); //memmove lets the source and destination overlap
|
||||
fread(((complexf*)input_buffer)+(the_bufsize-state.input_processed), sizeof(complexf), state.input_processed, stdin);
|
||||
//fprintf(stderr,"iskip=%d state.output_size=%d start=%x target=%x skipcount=%x \n",state.input_processed,state.output_size,input_buffer, ((complexf*)input_buffer)+(BIG_BUFSIZE-state.input_processed),(BIG_BUFSIZE-state.input_processed));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1707,7 +1707,7 @@ int timing_recovery(complexf* input, complexf* output, int input_size, timing_re
|
|||
current_bitstart_index += num_samples_halfbit * 2 + num_samples_halfbit * (-error/2);
|
||||
}
|
||||
state->input_processed = current_bitstart_index;
|
||||
state->output_i = si;
|
||||
state->output_size = si;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue