]> code.octet-stream.net Git - m17rt/blobdiff - m17app/src/soundmodem.rs
fast demod bin
[m17rt] / m17app / src / soundmodem.rs
index c0cbfbb3121480b2fa0ebf3264f2c0df757e2572..19a3dd528ba13ee0068f99f66ba10a8db2a2befa 100644 (file)
@@ -9,8 +9,8 @@ use std::fmt::Display;
 use std::fs::File;
 use std::io::{self, Read, Write};
 use std::path::PathBuf;
-use std::sync::mpsc::{channel, sync_channel, Receiver, Sender, SyncSender, TryRecvError};
 use std::sync::RwLock;
+use std::sync::mpsc::{Receiver, Sender, SyncSender, TryRecvError, channel, sync_channel};
 use std::sync::{Arc, Mutex};
 use std::time::{Duration, Instant};
 use thiserror::Error;
@@ -234,7 +234,7 @@ fn spawn_soundmodem_worker(
                 }
                 SoundmodemEvent::BasebandInput(b) => {
                     for sample in &*b {
-                        if let Some(frame) = demodulator.demod(*sample) {
+                        if let Some((frame, _)) = demodulator.demod(*sample) {
                             tnc.handle_frame(frame);
                             loop {
                                 let n = tnc.read_kiss(&mut buf);