From 8b851258e240c1dfb7f738f82cbd139dc2612700 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 16 May 2023 11:53:23 +0100 Subject: util/spkmodem_recv: Rename functions for clarity Signed-off-by: Leah Rowe --- util/spkmodem_recv/spkmodem-recv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'util') diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index d239e9c1..1ba402ca 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -28,8 +28,8 @@ int pos, f1, f2; int amplitude = 0; int lp = 0; -void read_sample(void); -void print_chars(void); +void fetch_sample(void); +void handle_audio(void); int main(int argc, char *argv[]) @@ -37,13 +37,13 @@ main(int argc, char *argv[]) (void)argc; (void)argv; while (!feof(stdin)) - print_chars(); + handle_audio(); return errno; } void -print_chars(void) +handle_audio(void) { static int ascii_bit = 7; static char ascii = 0; @@ -61,7 +61,7 @@ print_chars(void) if (f2 <= FREQ_SEP_MIN || f2 >= FREQ_SEP_MAX || f1 <= FREQ_DATA_MIN || f1 >= FREQ_DATA_MAX) { - read_sample(); + fetch_sample(); return; } #if DEBUG @@ -86,11 +86,11 @@ print_chars(void) lp = 0; llp = 0; for (int i = 0; i < SAMPLES_PER_FRAME; i++) - read_sample(); + fetch_sample(); } void -read_sample(void) +fetch_sample(void) { amplitude -= abs(frame[ringpos]); f1 -= pulse[ringpos]; -- cgit v1.2.1