Start to support XA audio

This commit is contained in:
jaby 2024-11-03 21:40:39 +00:00
parent 54a1ca08ea
commit 206fd6e90b
3 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,4 @@
pub mod my_xa;
pub mod vag;
pub mod xa;

View File

@ -0,0 +1,6 @@
use std::io::Write;
use tool_helper::{Error, Input};
pub fn convert(_input: Input, _output: &mut dyn Write) -> Result<(), Error> {
Err(Error::not_implemented("XA conversion"))
}

View File

@ -25,6 +25,7 @@ enum SubCommands {
Nothing,
SimpleTIM(reduced_tim::Arguments),
VAG(vag::Arguments),
MyXA,
// === External Commands ===
XA(xa::Arguments),
@ -36,6 +37,7 @@ impl SubCommands {
SubCommands::Nothing => false,
SubCommands::SimpleTIM(_) => false,
SubCommands::VAG(_) => false,
SubCommands::MyXA => false,
SubCommands::XA(_) => true
}
@ -61,6 +63,7 @@ fn run_internal_conversion(cmd: CommandLine) -> Result<(), Error> {
SubCommands::Nothing => nothing::copy(&mut input, dst_buffer),
SubCommands::SimpleTIM(args) => reduced_tim::convert(args, input, dst_buffer),
SubCommands::VAG(args) => audio::vag::convert(args, &cmd.output_file, input, dst_buffer),
SubCommands::MyXA => audio::my_xa::convert(input, dst_buffer),
_ => Err(Error::from_str("External functions can not be called for internal conversion"))
}
};