diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 82b71343046aa8c7670f36ad4d41f127b95d58ba..94a0069e6b79b59f1babcea46f20f02fcd6de0ee 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -74,30 +74,6 @@ handle_audio(void) fetch_sample(); } -void -print_char(void) -{ -#if DEBUG - long stdin_pos = 0; - if ((stdin_pos = ftell(stdin)) == -1) - err(errno, NULL); - printf ("%d %d %d @%ld\n", f1, f2, FREQ_DATA_THRESHOLD, - stdin_pos - sizeof(frame)); -#endif - if (f1 < FREQ_DATA_THRESHOLD) - ascii |= (1 << ascii_bit); - ascii_bit--; - if (ascii_bit < 0) { -#if DEBUG - printf("<%c, %x>", ascii, ascii); -#else - printf("%c", ascii); -#endif - ascii_bit = 7; - ascii = 0; - } -} - void fetch_sample(void) { @@ -122,3 +98,27 @@ fetch_sample(void) ringpos %= 2 * SAMPLES_PER_FRAME; lp++; } + +void +print_char(void) +{ +#if DEBUG + long stdin_pos = 0; + if ((stdin_pos = ftell(stdin)) == -1) + err(errno, NULL); + printf ("%d %d %d @%ld\n", f1, f2, FREQ_DATA_THRESHOLD, + stdin_pos - sizeof(frame)); +#endif + if (f1 < FREQ_DATA_THRESHOLD) + ascii |= (1 << ascii_bit); + ascii_bit--; + if (ascii_bit < 0) { +#if DEBUG + printf("<%c, %x>", ascii, ascii); +#else + printf("%c", ascii); +#endif + ascii_bit = 7; + ascii = 0; + } +}