Start to support XA audio
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
pub mod my_xa;
|
||||||
pub mod vag;
|
pub mod vag;
|
||||||
pub mod xa;
|
pub mod xa;
|
||||||
|
|
||||||
|
|||||||
6
src/Tools/psxfileconv/src/audio/my_xa/mod.rs
Normal file
6
src/Tools/psxfileconv/src/audio/my_xa/mod.rs
Normal 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"))
|
||||||
|
}
|
||||||
@@ -25,6 +25,7 @@ enum SubCommands {
|
|||||||
Nothing,
|
Nothing,
|
||||||
SimpleTIM(reduced_tim::Arguments),
|
SimpleTIM(reduced_tim::Arguments),
|
||||||
VAG(vag::Arguments),
|
VAG(vag::Arguments),
|
||||||
|
MyXA,
|
||||||
|
|
||||||
// === External Commands ===
|
// === External Commands ===
|
||||||
XA(xa::Arguments),
|
XA(xa::Arguments),
|
||||||
@@ -36,6 +37,7 @@ impl SubCommands {
|
|||||||
SubCommands::Nothing => false,
|
SubCommands::Nothing => false,
|
||||||
SubCommands::SimpleTIM(_) => false,
|
SubCommands::SimpleTIM(_) => false,
|
||||||
SubCommands::VAG(_) => false,
|
SubCommands::VAG(_) => false,
|
||||||
|
SubCommands::MyXA => false,
|
||||||
|
|
||||||
SubCommands::XA(_) => true
|
SubCommands::XA(_) => true
|
||||||
}
|
}
|
||||||
@@ -61,6 +63,7 @@ fn run_internal_conversion(cmd: CommandLine) -> Result<(), Error> {
|
|||||||
SubCommands::Nothing => nothing::copy(&mut input, dst_buffer),
|
SubCommands::Nothing => nothing::copy(&mut input, dst_buffer),
|
||||||
SubCommands::SimpleTIM(args) => reduced_tim::convert(args, 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::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"))
|
_ => Err(Error::from_str("External functions can not be called for internal conversion"))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user