]>
code.octet-stream.net Git - m17rt/blob - tools/m17rt-mod/src/main.rs
c616b2e8b0110247a8b40f67cf8c7170dd0aeae7
1 use m17app
::app
::M17App
;
2 use m17app
::link_setup
::M17Address
;
3 use m17app
::soundmodem
::{
4 InputRrcFile
, InputSoundcard
, NullInputSource
, NullOutputSink
, NullPtt
, OutputRrcFile
,
5 OutputSoundcard
, Soundmodem
,
7 use m17codec2
::{Codec2Adapter
, WavePlayer
};
8 use std
::path
::PathBuf
;
11 let in_path
= PathBuf
::from("../../../Data/test_vk7xt_8k.wav");
12 let out_path
= PathBuf
::from("../../../Data/mymod.rrc");
13 let output
= OutputRrcFile
::new(out_path
);
14 //let output = OutputSoundcard::new();
15 let soundmodem
= Soundmodem
::new(NullInputSource
::new(), output
, NullPtt
::new());
16 let app
= M17App
::new(soundmodem
);
18 std
::thread
::sleep(std
::time
::Duration
::from_secs(1));
19 println
!("Beginning playback...");
23 &M17Address
::from_callsign("VK7XT").unwrap
(),
24 &M17Address
::new_broadcast(),
27 println
!("Playback complete, terminating in 5 secs");
28 std
::thread
::sleep(std
::time
::Duration
::from_secs(5));