X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/1a444762d8fd7d48e4f56a87c6bd77f837522d5d..HEAD:/tools/m17rt-rxpacket/src/main.rs?ds=sidebyside diff --git a/tools/m17rt-rxpacket/src/main.rs b/tools/m17rt-rxpacket/src/main.rs index 1cdd1d8..012cc46 100755 --- a/tools/m17rt-rxpacket/src/main.rs +++ b/tools/m17rt-rxpacket/src/main.rs @@ -1,18 +1,14 @@ use m17app::adapter::PacketAdapter; use m17app::app::M17App; use m17app::link_setup::LinkSetup; -use m17app::soundmodem::{InputRrcFile, NullOutputSink, NullPtt, Soundmodem}; -use m17core::protocol::PacketType; -use std::path::PathBuf; +use m17app::soundcard::Soundcard; +use m17app::soundmodem::{NullOutputSink, NullPtt, Soundmodem}; +use m17app::PacketType; use std::sync::Arc; fn main() { - let path = PathBuf::from("../../../Data/mypacket.rrc"); - let soundmodem = Soundmodem::new( - InputRrcFile::new(path), - NullOutputSink::new(), - NullPtt::new(), - ); + let soundcard = Soundcard::new("plughw:CARD=Device,DEV=0").unwrap(); + let soundmodem = Soundmodem::new(soundcard.input(), NullOutputSink::new(), NullPtt::new()); let app = M17App::new(soundmodem); app.add_packet_adapter(PacketPrinter); app.start();