]> code.octet-stream.net Git - m17rt/blob - tools/m17rt-demod/src/main.rs
Successful round tripping wav -> rrc -> audio out
[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 source = InputRrcFile::new(path);
10 //let source = InputSoundcard::new();
11 let soundmodem = Soundmodem::new_with_input_and_output(source, NullOutputSink::new());
12 let app = M17App::new(soundmodem);
13 app.add_stream_adapter(Codec2Adapter::new());
14 app.start();
15 std::thread::sleep(std::time::Duration::from_secs(15));
16 }
17
18 fn main() {
19 env_logger::init();
20 m17app_test();
21 }