From 23807c9104c5201b83a5344a103b913a9a3ad8f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gaier?= Date: Wed, 14 Aug 2024 15:30:13 -0500 Subject: [PATCH] Support displaying name of missing file for CDDA tracks --- src/Tools/Tools.code-workspace | 20 ++------------------ src/Tools/psxcdgen_ex/Cargo.toml | 2 +- src/Tools/psxcdgen_ex/src/lib.rs | 9 +++++++-- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/Tools/Tools.code-workspace b/src/Tools/Tools.code-workspace index 13609621..7f74f1eb 100644 --- a/src/Tools/Tools.code-workspace +++ b/src/Tools/Tools.code-workspace @@ -41,11 +41,6 @@ "group": { "kind": "build", }, - "options": { - "env": { - "CARGO_RUN_ARGS": "${input:cargo run args}" - } - } }, { "label": "cargo test", @@ -90,20 +85,9 @@ { "id": "cargo target", "type": "pickString", - "options": ["windows", "linux"], + "options": ["linux", "windows"], + "default": "linux", "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" } ] } diff --git a/src/Tools/psxcdgen_ex/Cargo.toml b/src/Tools/psxcdgen_ex/Cargo.toml index 4bd1ed4f..60795634 100644 --- a/src/Tools/psxcdgen_ex/Cargo.toml +++ b/src/Tools/psxcdgen_ex/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "psxcdgen_ex" -version = "1.0.0" +version = "1.0.1" edition = "2021" [profile.release] diff --git a/src/Tools/psxcdgen_ex/src/lib.rs b/src/Tools/psxcdgen_ex/src/lib.rs index 1babaaf4..408ee89f 100644 --- a/src/Tools/psxcdgen_ex/src/lib.rs +++ b/src/Tools/psxcdgen_ex/src/lib.rs @@ -233,8 +233,13 @@ fn parse_configuration(config: config_reader::Configuration) -> Result<(CDDesc, } for cd_da_file in cd_da_files { - let mut audio_io = hound::WavReader::open(&cd_da_file.file_path)?; - let header = audio_io.spec(); + let mut audio_io = { + 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 { return Err(Error::from_text(format!("{}: Only integer WAV format (PCM) is supported for Audio tracks", cd_da_file.file_path.display())));