Skip to content

Commit

Permalink
add x.wav handler
Browse files Browse the repository at this point in the history
Former-commit-id: b5e1d64
  • Loading branch information
YuzukiTsuru committed Jun 5, 2022
1 parent 7b0f7dc commit ef7873b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/FileIO/AudioModelIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,9 @@ bool AudioModelIO::CheckAudioModelFile(const std::filesystem::path &path) {
bool AudioModelIO::CheckAudioModel() {
YALL_DEBUG_ << "Check AudioModel File: " + in_file_path.string();

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

Expand Down
2 changes: 1 addition & 1 deletion src/lessampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void lessampler::run() {

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

Expand Down

0 comments on commit ef7873b

Please sign in to comment.