X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/608ca7e33ab51d812607ddcc3429bfa9aa3c34b0..3903e719137aba15d30dd58b8d917965ec602400:/m17app/src/rtlsdr.rs?ds=inline diff --git a/m17app/src/rtlsdr.rs b/m17app/src/rtlsdr.rs index 33f8070..658aca4 100644 --- a/m17app/src/rtlsdr.rs +++ b/m17app/src/rtlsdr.rs @@ -1,21 +1,12 @@ use std::{ io::Read, process::{Child, Command, Stdio}, - sync::{ - mpsc::{sync_channel, Receiver, SyncSender}, - Arc, Mutex, RwLock, - }, - time::{Duration, Instant}, -}; - -use cpal::{ - traits::{DeviceTrait, HostTrait, StreamTrait}, - SampleFormat, SampleRate, Stream, + sync::{mpsc::SyncSender, Mutex}, }; use crate::{ error::M17Error, - soundmodem::{InputSource, OutputBuffer, OutputSink, SoundmodemEvent}, + soundmodem::{InputSource, SoundmodemEvent}, }; pub struct RtlSdr { @@ -80,6 +71,7 @@ impl InputSource for RtlSdr { } } }); + *self.rtlfm.lock().unwrap() = Some(cmd); } fn close(&self) {