aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2025-03-02 20:21:28 -0500
committerGravatar Chris Xiong <chirs241097@gmail.com> 2025-03-02 20:21:28 -0500
commite9aaf095a805f08fccc4407c8f1dc60780382f63 (patch)
tree5fa279250be742132b290e9637856857ecfe0a15 /src/main.rs
parent1b75753a315064a97c14742babcc783dedb7bf6f (diff)
downloadit2midi-e9aaf095a805f08fccc4407c8f1dc60780382f63.tar.xz
Actually starting the rewrite.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs
index e7520c7..8ae139b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,19 +2,28 @@ 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) =>
+ /*match itfile::load("/home/chrisoft/Music/mods/nb_tear of the sun.it")
{
- let mut conv = convert::Converter::new(&f);
- conv.convert();
- let mf = conv.result();
- midifile::write_file("output.mid", &mf)?;
- Ok(())
+ 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) => {
+ let player = player::BasePlayer::new(&f);
+ player::Player::play(&player);
+ Ok(())
+ }
+ Err(e) => Err(e)
}
- Err(e) => Err(e)
- }
}