]> code.octet-stream.net Git - m17rt/blob - tools/m17rt-demod/src/main.rs
Support for baseband output to a soundcard
[m17rt] / tools / m17rt-demod / src / main.rs
1 use m17app::app::M17App;
2 use m17app::soundmodem::{InputRrcFile, InputSoundcard, NullOutputSink, Soundmodem};
3 use m17codec2::Codec2Adapter;
4 use std::path::PathBuf;
5
6 pub fn m17app_test() {
7 //let path = PathBuf::from("../../../Data/test_vk7xt.rrc");
8 let path = PathBuf::from("../../../Data/mymod.rrc");
9 //let path = PathBuf::from("../../../Data/mymod-noisy.raw");
10 let source = InputRrcFile::new(path);
11 //let source = InputSoundcard::new();
12 let soundmodem = Soundmodem::new_with_input_and_output(source, NullOutputSink::new());
13 let app = M17App::new(soundmodem);
14 app.add_stream_adapter(Codec2Adapter::new());
15 app.start();
16 std::thread::sleep(std::time::Duration::from_secs(15));
17 }
18
19 fn main() {
20 env_logger::init();
21 m17app_test();
22 }