Skip to content

Commit

Permalink
Fix logging for desnd
Browse files Browse the repository at this point in the history
  • Loading branch information
SalsaGal committed Oct 9, 2024
1 parent dbbf15d commit c7ba045
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions desnd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{fmt::Display, fs::File, io::Write, ops::Range, path::PathBuf, slice::I

use core::{
clap::{self, Parser, ValueEnum},
log::error,
log::{error, info},
};

#[derive(Clone, Copy, Debug, Default, ValueEnum)]
Expand Down Expand Up @@ -311,33 +311,33 @@ fn main() {
}
}

println!("SND header");
println!("Header bytes: {}", snd_file.header.header_size);
info!("SND header");
info!("Header bytes: {}", snd_file.header.header_size);
if let Some(version) = snd_file.header.bank_version {
let minor = version.to_le_bytes()[0];
let major = version.to_le_bytes()[1];
println!(
info!(
"SND version: {major}.{minor} ({:?})",
args.file_version.unwrap_or_default()
);
} else {
println!("SND version: Gex");
info!("SND version: Gex");
}
println!(
info!(
"System: {}",
if args.dreamcast {
"Dreamcast"
} else {
"PlayStation"
},
);
println!("Reverb mode: {}", snd_file.header.reverb_mode);
println!("Reverb depth: {}", snd_file.header.reverb_depth);
println!("Instruments: {}", snd_file.header.num_programs);
println!("Zones: {}", snd_file.header.num_zones);
println!("Samples: {}", snd_file.header.num_waves);
println!("Sequences: {}", snd_file.header.num_sequences);
println!("Labels: {}", snd_file.header.num_labels);
info!("Reverb mode: {}", snd_file.header.reverb_mode);
info!("Reverb depth: {}", snd_file.header.reverb_depth);
info!("Instruments: {}", snd_file.header.num_programs);
info!("Zones: {}", snd_file.header.num_zones);
info!("Samples: {}", snd_file.header.num_waves);
info!("Sequences: {}", snd_file.header.num_sequences);
info!("Labels: {}", snd_file.header.num_labels);
}

#[derive(Debug)]
Expand Down

0 comments on commit c7ba045

Please sign in to comment.