Skip to content

Commit ef7873b

Browse files
committed
add x.wav handler
Former-commit-id: b5e1d64
1 parent 7b0f7dc commit ef7873b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/FileIO/AudioModelIO.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ bool AudioModelIO::CheckAudioModelFile(const std::filesystem::path &path) {
281281
bool AudioModelIO::CheckAudioModel() {
282282
YALL_DEBUG_ << "Check AudioModel File: " + in_file_path.string();
283283

284-
// x.wav handler
285-
if (in_file_path.stem() == std::filesystem::path("x")){
284+
// In some projects, the creator will use x.wav, z.wav or other non-existing audio to force truncation of audio
285+
// here is a basic handle to reduce errors
286+
if (!std::filesystem::exists(in_file_path)){
286287
return true;
287288
}
288289

src/lessampler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void lessampler::run() {
5858

5959
// Check if an audio model exists。 If it does not exist, turn on multithreaded generation
6060
if (!audio_model_io.CheckAudioModel()) {
61-
YALL_INFO_ << "Audio model not found, generating...";
61+
YALL_INFO_ << "Audio model: " + in_file_path.string() + " not found, generating...";
6262
GenerateAudioModel genmodule(std::filesystem::weakly_canonical(std::filesystem::path(argv[1])).parent_path(), configure);
6363
}
6464

0 commit comments

Comments
 (0)