From b508245451b71b3443fa3202f3863a6de731e9c8 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 14 Jun 2023 08:43:54 +0100 Subject: util/spkmodem-recv: rename function for clarity Signed-off-by: Leah Rowe --- util/spkmodem_recv/spkmodem-recv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 9776ebc8..24f1354f 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -43,7 +43,7 @@ int ringpos, debug, freq_data, freq_separator, sample_count, ascii_bit = 7; char ascii = 0; void handle_audio(void); -void fetch_sample(void); +void decode_pulse(void); int set_ascii_bit(void); void print_char(void); void print_stats(void); @@ -74,7 +74,7 @@ handle_audio(void) sample_count = reset_char(); if ((freq_separator <= FREQ_SEP_MIN) || (freq_separator >= FREQ_SEP_MAX) || (freq_data <= FREQ_DATA_MIN) || (freq_data >= FREQ_DATA_MAX)) { - fetch_sample(); + decode_pulse(); return; } @@ -82,11 +82,11 @@ handle_audio(void) print_char(); sample_count = 0; for (int sample = 0; sample < SAMPLES_PER_FRAME; sample++) - fetch_sample(); + decode_pulse(); } void -fetch_sample(void) +decode_pulse(void) { int next_ringpos = (ringpos + SAMPLES_PER_FRAME) % MAX_SAMPLES; freq_data -= pulse[ringpos]; -- cgit v1.2.1