From 6480b5447cfe67e2bd6662cc07c31cc2f8878f09 Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 3 Nov 2024 21:40:39 +0000 Subject: [PATCH] Start to support XA audio --- src/Tools/psxfileconv/src/audio/mod.rs | 1 + src/Tools/psxfileconv/src/audio/my_xa/mod.rs | 6 ++++++ src/Tools/psxfileconv/src/main.rs | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 src/Tools/psxfileconv/src/audio/my_xa/mod.rs diff --git a/src/Tools/psxfileconv/src/audio/mod.rs b/src/Tools/psxfileconv/src/audio/mod.rs index 369e3c1e..677cedea 100644 --- a/src/Tools/psxfileconv/src/audio/mod.rs +++ b/src/Tools/psxfileconv/src/audio/mod.rs @@ -1,3 +1,4 @@ +pub mod my_xa; pub mod vag; pub mod xa; diff --git a/src/Tools/psxfileconv/src/audio/my_xa/mod.rs b/src/Tools/psxfileconv/src/audio/my_xa/mod.rs new file mode 100644 index 00000000..d1186750 --- /dev/null +++ b/src/Tools/psxfileconv/src/audio/my_xa/mod.rs @@ -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")) +} \ No newline at end of file diff --git a/src/Tools/psxfileconv/src/main.rs b/src/Tools/psxfileconv/src/main.rs index 658e3ba9..9ac92376 100644 --- a/src/Tools/psxfileconv/src/main.rs +++ b/src/Tools/psxfileconv/src/main.rs @@ -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")) } };