mod itfile; mod midifile; mod portmod; mod convert; mod player; mod utils; fn main() -> Result<(), itfile::Error> { /*match itfile::load("/home/chrisoft/Music/mods/nb_tear of the sun.it") { Ok(f) => { let mut conv = convert::Converter::new(&f); conv.convert(); let mf = conv.result(); midifile::write_file("output.mid", &mf)?; Ok(()) } Err(e) => Err(e) }?;*/ match itfile::load("/home/chrisoft/Music/mods/nb_tear of the sun.it") { Ok(f) => { for s in &f.samps { let converted = s.convert_samples(); for v in converted { std::io::Write::write(&mut std::io::stderr(), &v.to_le_bytes()).unwrap(); } } let player = player::BasePlayer::new(&f); player::Player::play(&player); Ok(()) } Err(e) => Err(e) } }