mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
spkmodem-decode: fix learn_samples increment
oops!!! another mistake during refactoring. right now it doesn't increment before being checked, so learning can go forever in an infinite loop Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -463,13 +463,13 @@ auto_detect_tone(struct decoder_state *st)
|
||||
if (st->learn_samples >= LEARN_SAMPLES)
|
||||
return;
|
||||
|
||||
st->learn_samples++;
|
||||
|
||||
if (silent_signal(st))
|
||||
return;
|
||||
|
||||
select_low_tone(st);
|
||||
|
||||
st->learn_samples++;
|
||||
|
||||
if (st->learn_samples == LEARN_SAMPLES) {
|
||||
st->freq_threshold =
|
||||
(st->freq_min + st->freq_max) / 2;
|
||||
|
||||
Reference in New Issue
Block a user