Use new VAG tool

This commit is contained in:
2024-11-03 21:30:04 +00:00
parent 05a3be7836
commit 4ae3f1fb3d
5 changed files with 9 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
pub mod my_vag;
pub mod vag;
pub mod old_vag;
pub mod xa;
use std::{env, path::PathBuf, process::Command};

View File

@@ -24,10 +24,9 @@ enum SubCommands {
// === Internal Commands ===
Nothing,
SimpleTIM(reduced_tim::Arguments),
MyVAG(my_vag::Arguments),
VAG(my_vag::Arguments),
// === External Commands ===
VAG(vag::Arguments),
XA(xa::Arguments),
}
@@ -36,9 +35,8 @@ impl SubCommands {
match self {
SubCommands::Nothing => false,
SubCommands::SimpleTIM(_) => false,
SubCommands::MyVAG(_) => false,
SubCommands::VAG(_) => false,
SubCommands::VAG(_) => true,
SubCommands::XA(_) => true
}
}
@@ -62,7 +60,7 @@ fn run_internal_conversion(cmd: CommandLine) -> Result<(), Error> {
match cmd.sub_command {
SubCommands::Nothing => nothing::copy(&mut input, dst_buffer),
SubCommands::SimpleTIM(args) => reduced_tim::convert(args, input, dst_buffer),
SubCommands::MyVAG(args) => audio::my_vag::convert(args, &cmd.output_file, input, dst_buffer),
SubCommands::VAG(args) => audio::my_vag::convert(args, &cmd.output_file, input, dst_buffer),
_ => Err(Error::from_str("External functions can not be called for internal conversion"))
}
};
@@ -94,9 +92,8 @@ fn run_external_conversion(cmd: CommandLine) -> Result<(), Error> {
let is_xa = matches!(cmd.sub_command, SubCommands::XA(_));
match cmd.sub_command {
SubCommands::VAG(args) => vag::convert(args, input_file, output_file.clone()),
SubCommands::XA(args) => xa::convert(args, input_file, output_file.clone()),
_ => Err(Error::from_str("Internal functions can not be called for external conversion"))
SubCommands::XA(args) => xa::convert(args, input_file, output_file.clone()),
_ => Err(Error::from_str("Internal functions can not be called for external conversion"))
}?;
if cmd.compress_lz4 {