diff options
author | Leah Rowe <leah@libreboot.org> | 2023-06-04 15:31:23 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-06-04 15:31:23 +0100 |
commit | 9a6d290871a951a420f9eeb77bf22365c6ca4433 (patch) | |
tree | a38e1a7a1d5c4d1cd24da0774f70f34ad2455a7f /util/spkmodem_recv | |
parent | a61ab37b67a1f860554989b6ff2491127259955f (diff) |
util/spkmodem-recv: another minor code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/spkmodem_recv')
-rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index b19c49a4..bf522daa 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -66,9 +66,8 @@ handle_audio(void) if (lp > (3 * SAMPLES_PER_FRAME)) { ascii_bit = 7; - ascii = 0; - lp = 0; - llp++; + ascii = lp = 0; + ++llp; } if (llp == FLUSH_TIMEOUT) if (fflush(stdout) == EOF) @@ -98,8 +97,9 @@ fetch_sample(void) read_frame(ringpos); pulse[ringpos] = (abs(frame[ringpos]) > THRESHOLD) ? 1 : 0; - if (pulse[ringpos++]) + if (pulse[ringpos]) ++f2; + ++ringpos; ringpos %= 2 * SAMPLES_PER_FRAME; ++lp; } |