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();