]> code.octet-stream.net Git - m17rt/blob - tools/m17rt-demod/src/main.rs
Fix timing bugs and add documentation
[m17rt] / tools / m17rt-demod / src / main.rs
1 use m17app::app::M17App;
2 use m17app::soundcard::Soundcard;
3 use m17app::soundmodem::{NullOutputSink, NullPtt, Soundmodem};
4 use m17codec2::Codec2Adapter;
5
6 pub fn demod_test() {
7 let soundcard = Soundcard::new("plughw:CARD=Device,DEV=0").unwrap();
8 let soundmodem = Soundmodem::new(soundcard.input(), NullOutputSink::new(), NullPtt::new());
9 let app = M17App::new(soundmodem);
10 app.add_stream_adapter(Codec2Adapter::new());
11 app.start();
12
13 loop {
14 std::thread::park();
15 }
16 }
17
18 fn main() {
19 env_logger::init();
20 demod_test();
21 }