]>
code.octet-stream.net Git - m17rt/blob - tools/m17rt-mod/src/main.rs
1 use m17app
::app
::M17App
;
2 use m17app
::soundmodem
::{
3 InputRrcFile
, InputSoundcard
, NullInputSource
, NullOutputSink
, OutputRrcFile
, Soundmodem
,
5 use m17codec2
::{Codec2Adapter
, WavePlayer
};
6 use std
::path
::PathBuf
;
9 let in_path
= PathBuf
::from("../../../Data/test_vk7xt_8k.wav");
10 let out_path
= PathBuf
::from("../../../Data/mymod.rrc");
12 Soundmodem
::new_with_input_and_output(NullInputSource
::new(), OutputRrcFile
::new(out_path
));
13 let app
= M17App
::new(soundmodem
);
15 std
::thread
::sleep(std
::time
::Duration
::from_secs(1));
16 println
!("Beginning playback...");
17 WavePlayer
::play(in_path
, app
.tx());
18 println
!("Playback complete, terminating in 5 secs");
19 std
::thread
::sleep(std
::time
::Duration
::from_secs(5));