X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/4cfda08117c4288a5408d45db1ef4be82f4facaa..608ca7e33ab51d812607ddcc3429bfa9aa3c34b0:/tools/m17rt-demod/src/main.rs diff --git a/tools/m17rt-demod/src/main.rs b/tools/m17rt-demod/src/main.rs index 1125c3a..af5fafd 100755 --- a/tools/m17rt-demod/src/main.rs +++ b/tools/m17rt-demod/src/main.rs @@ -1,21 +1,21 @@ use m17app::app::M17App; -use m17app::soundmodem::{InputRrcFile, InputSoundcard, NullOutputSink, Soundmodem}; +use m17app::soundcard::Soundcard; +use m17app::soundmodem::{NullOutputSink, NullPtt, Soundmodem}; use m17codec2::Codec2Adapter; -use std::path::PathBuf; -pub fn m17app_test() { - //let path = PathBuf::from("../../../Data/test_vk7xt.rrc"); - let path = PathBuf::from("../../../Data/mymod.rrc"); - let source = InputRrcFile::new(path); - //let source = InputSoundcard::new(); - let soundmodem = Soundmodem::new_with_input_and_output(source, NullOutputSink::new()); +pub fn demod_test() { + 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_stream_adapter(Codec2Adapter::new()); app.start(); - std::thread::sleep(std::time::Duration::from_secs(15)); + + loop { + std::thread::park(); + } } fn main() { env_logger::init(); - m17app_test(); + demod_test(); }