Support displaying name of missing file for CDDA tracks
This commit is contained in:
parent
dbbc781c65
commit
23807c9104
|
@ -41,11 +41,6 @@
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
},
|
},
|
||||||
"options": {
|
|
||||||
"env": {
|
|
||||||
"CARGO_RUN_ARGS": "${input:cargo run args}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "cargo test",
|
"label": "cargo test",
|
||||||
|
@ -90,20 +85,9 @@
|
||||||
{
|
{
|
||||||
"id": "cargo target",
|
"id": "cargo target",
|
||||||
"type": "pickString",
|
"type": "pickString",
|
||||||
"options": ["windows", "linux"],
|
"options": ["linux", "windows"],
|
||||||
|
"default": "linux",
|
||||||
"description": "The target for the tool to build"
|
"description": "The target for the tool to build"
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "cargo run args",
|
|
||||||
"type": "pickString",
|
|
||||||
"options": [
|
|
||||||
"",
|
|
||||||
"--help",
|
|
||||||
"--list -o ../Tests/Test_Planschbecken psx bin-cue ../Tests/ISO_Planschbecken.xml",
|
|
||||||
"--wsl -o Planschbecken.bin ../../../examples/PoolBox/application/bin/PSX-release/PoolBox.elf"
|
|
||||||
],
|
|
||||||
"default": "",
|
|
||||||
"description": "Argument options to pass to cargo run"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "psxcdgen_ex"
|
name = "psxcdgen_ex"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
|
|
@ -233,8 +233,13 @@ fn parse_configuration(config: config_reader::Configuration) -> Result<(CDDesc,
|
||||||
}
|
}
|
||||||
|
|
||||||
for cd_da_file in cd_da_files {
|
for cd_da_file in cd_da_files {
|
||||||
let mut audio_io = hound::WavReader::open(&cd_da_file.file_path)?;
|
let mut audio_io = {
|
||||||
let header = audio_io.spec();
|
match hound::WavReader::open(&cd_da_file.file_path) {
|
||||||
|
Ok(audio_io) => Ok(audio_io),
|
||||||
|
Err(error) => Err(Error::from_text(format!("Failed to open CD Audio Track {} with error: {}", cd_da_file.file_path.to_string_lossy(), error)))
|
||||||
|
}
|
||||||
|
}?;
|
||||||
|
let header = audio_io.spec();
|
||||||
|
|
||||||
if header.sample_format != hound::SampleFormat::Int {
|
if header.sample_format != hound::SampleFormat::Int {
|
||||||
return Err(Error::from_text(format!("{}: Only integer WAV format (PCM) is supported for Audio tracks", cd_da_file.file_path.display())));
|
return Err(Error::from_text(format!("{}: Only integer WAV format (PCM) is supported for Audio tracks", cd_da_file.file_path.display())));
|
||||||
|
|
Loading…
Reference in New Issue